Skip to content
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

Merged
merged 19 commits into from
Nov 21, 2023
Merged

Front end #52

merged 19 commits into from
Nov 21, 2023

Conversation

jasozh
Copy link
Collaborator

@jasozh jasozh commented Oct 28, 2023

No description provided.

@@ -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';
Copy link
Member

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} />} /> */}
Copy link
Member

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!

Comment on lines +38 to +46
// 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);

Copy link
Member

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

Comment on lines +108 to -46
{/* <UploadPDFToS3WithNativeSdk /> */}
{/* <button onClick={handleClick}>Redirect to results</button> */}
{/* <button onClick={log_image}>log image!</button> */}
</div>
{/* <button onClick={log_image}>log image!</button> */}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment delete

Comment on lines +16 to +36
// 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)
// // }
Copy link
Member

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 () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete commented out code

@zhangtravis
Copy link
Member

TODO for Jason: Make sure to delete comments once everything works. I'll approve for now.

@jasozh jasozh merged commit 129880c into main Nov 21, 2023
3 checks passed
@jasozh jasozh deleted the front-end branch November 21, 2023 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants