]> git.somenet.org - pub/jan/aic18.git/blob - service-website/src/components/PdfReport.js
Add run configuration for 'react-scripts start'
[pub/jan/aic18.git] / service-website / src / components / PdfReport.js
1 import React from "react";
2 import PropTypes from "prop-types";
3
4 const PdfReport = ({pdfLink, loading}) => {
5     if (pdfLink) {
6         return (
7             <div className="pdf-report">
8                 <a href={pdfLink} target="_blank" rel="noopener noreferrer">Download PDF report</a>
9             </div>
10         );
11     } else if (loading){
12         return (
13             <div className="spinner">
14                 <div className="rect1 has-background-info"></div>
15                 <div className="rect2 has-background-info"></div>
16                 <div className="rect3 has-background-info"></div>
17                 <div className="rect4 has-background-info"></div>
18                 <div className="rect5 has-background-info"></div>
19             </div>
20         );
21     } else {
22         return null;
23     }
24 };
25
26 PdfReport.propTypes = {
27     pdfLink: PropTypes.string,
28 };
29
30 export default PdfReport;