Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import 'semantic-ui-css/semantic.min.css'
import { pdfjs } from 'react-pdf';
import * as serviceWorker from './serviceWorker';
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;
ReactDOM.render(, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();
import { ActionCreators } from '../../actions/actionTypes';
import { AUTH_LEVEL, blockUnverifiedUser } from '../../helpers/checkAuthDialog';
import EnvChecker from '../../helpers/envChecker';
import RelatedPapers from '../relatedPapers';
import AfterDownloadContents from './component/afterDownloadContents';
import { PDFViewerProps } from './types';
import { AppState } from '../../reducers';
import ProgressSpinner from './component/progressSpinner';
import BlurBlocker from './component/blurBlocker';
import { addPaperToRecommendPool } from '../recommendPool/actions';
import { PDFViewerState } from '../../reducers/pdfViewer';
import { getBestPdf } from '../../actions/pdfViewer';
const useStyles = require('isomorphic-style-loader/useStyles');
const styles = require('./pdfViewer.scss');
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;
const DIRECT_PDF_PATH_PREFIX = 'https://asset-pdf.scinapse.io/';
function trackClickButton(actionTag: Scinapse.ActionTicket.ActionTagType, paperId: string) {
ActionTicketManager.trackTicket({
pageType: 'paperShow',
actionType: 'fire',
actionArea: 'pdfViewer',
actionTag,
actionLabel: String(paperId),
});
}
function getDirectPDFPath(path: string) {
return `${DIRECT_PDF_PATH_PREFIX + path}`;
}
import React, {useState} from 'react';
import {withStyles, Button, Dialog} from '@material-ui/core';
import {Document, Page, pdfjs} from 'react-pdf';
import nhantran from './nhantran.pdf'
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;
const style = {
root : {
position: 'absolute',
bottom: '25px',
right: '100px',
},
link: {
textDecoration: "none",
color: "white",
marginTop: '-35px'
},
}
const Resume = (props) => {
const [modalOpen, setModalOpen] = useState(false);