bravo68web-portfolio-nextjs/components/resume.jsx

31 lines
774 B
React
Raw Normal View History

import React, { useEffect, useState, useRef } from "react";
2022-03-31 07:50:45 +00:00
import { ResumeStyle } from "./resume.style";
function Resume() {
const viewer = useRef(null);
2022-03-31 07:50:45 +00:00
useEffect(() => {
import("@pdftron/webviewer").then(() => {
WebViewer(
{
path: ".",
mobileRedirect: true,
initialDoc:
"https://raw.githubusercontent.com/BRAVO68WEB/certificates/master/Jyotirmoy's%20Resume.pdf",
},
viewer.current
).then((instance) => {
const { docViewer } = instance;
// you can now call WebViewer APIs here...
});
});
2022-03-31 07:50:45 +00:00
}, []);
return (
<ResumeStyle>
<div className="webviewer" ref={viewer} style={{ height: "100vh" }}></div>
2022-03-31 07:50:45 +00:00
</ResumeStyle>
);
}
export default Resume;