-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Front end #52
Conversation
@@ -13,26 +13,27 @@ import 'bootstrap/dist/css/bootstrap.css'; | |||
// Internal component imports | |||
import NavBar from './components/NavBar.js'; | |||
import Home from './components/pages/Home.js'; | |||
import ReturnPage from './components/pages/ReturnPage.js'; | |||
// import ReturnPage from './components/pages/ReturnPage.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you delete this comment please
<Route exact path='/returnpage' element={<ReturnPage selectedFile={selectedFile}/>}/> | ||
<Route exact path='/results' element={<Results />}/> | ||
<Route exact path='/' element={<Home />} /> | ||
{/* <Route exact path='/returnpage' element={<ReturnPage selectedFile={selectedFile} />} /> */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not used, please delete all comments!
// setLoading(true) | ||
// await new Promise(resolve => setTimeout(resolve, 5000)); | ||
// redirect() | ||
|
||
// Send an API request with uploaded PDF blob | ||
// Current request is a placeholder, replace with something else later | ||
// const url = "http://mathsearch.org/api/send_request" | ||
// const response = await fetch(url); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete these comments if not used
{/* <UploadPDFToS3WithNativeSdk /> */} | ||
{/* <button onClick={handleClick}>Redirect to results</button> */} | ||
{/* <button onClick={log_image}>log image!</button> */} | ||
</div> | ||
{/* <button onClick={log_image}>log image!</button> */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment delete
// const [loading, setLoading] = useState(false) | ||
// const navigate = useNavigate() | ||
// const redirect = async () => { | ||
// // Test code | ||
// // try { | ||
// const url = "http://mathsearch.org/api/response_pdf"; | ||
// const response = await fetch(url); | ||
// // console.log("COOL") | ||
// // console.log(response) | ||
// const pdfBinary = await response.blob() | ||
|
||
// const url2 = "http://mathsearch.org/api/response_pages" | ||
// const response2 = await fetch(url2); | ||
// const pages = await response2.json() | ||
// // console.log(pages) | ||
// // const iframe = document.createElement('iframe'); | ||
// // iframe.src = `https://mozilla.github.io/pdf.js/web/viewer.html?file=${url}`; | ||
// // document.body.appendChild(iframe); | ||
// // } catch (err) { | ||
// // console.log(err) | ||
// // } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete these comments if not necessary. I want to reduce clutter :)
// } catch (err) { | ||
// console.log(err) | ||
// } | ||
// const test_api = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete commented out code
TODO for Jason: Make sure to delete comments once everything works. I'll approve for now. |
No description provided.