File size: 1,664 Bytes
f07bf73 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
import React, { useState, useEffect } from "react";
import { Container, Row } from "react-bootstrap";
import Button from "react-bootstrap/Button";
import Particle from "../Particle";
import pdf from "../../Assets/../Assets/Profile.pdf";
import { AiOutlineDownload } from "react-icons/ai";
import { Document, Page, pdfjs } from "react-pdf";
import "react-pdf/dist/esm/Page/AnnotationLayer.css";
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.min.js`;
function ResumeNew() {
const [width, setWidth] = useState(1200);
useEffect(() => {
setWidth(window.innerWidth);
}, []);
return (
<div>
<Container fluid className="resume-section">
<Particle />
<Row style={{ justifyContent: "center", position: "relative" }}>
<Button
variant="primary"
href={pdf}
target="_blank"
style={{ maxWidth: "250px" }}
>
<AiOutlineDownload />
Download CV
</Button>
</Row>
<Row className="resume">
<Document file={pdf} className="d-flex justify-content-center">
<Page pageNumber={1} scale={width > 786 ? 1.7 : 0.6} />
</Document>
</Row>
<Row style={{ justifyContent: "center", position: "relative" }}>
<Button
variant="primary"
href={pdf}
target="_blank"
style={{ maxWidth: "250px" }}
>
<AiOutlineDownload />
Download CV
</Button>
</Row>
</Container>
</div>
);
}
export default ResumeNew;
|