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

add back index.js #55

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions front-end/mathsearch/src/components/pages/Home.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React, {useState} from 'react';
import React, { useState } from 'react';
import { useNavigate } from "react-router-dom";

import UploadPDFToS3WithNativeSdk from '../UploadPDFToS3WithNativeSdk.js';
import LaTeXInput from '../LaTeXInput.js';
import pdf from "./sample.pdf"

import '../../App.css';
import './Home.css'
Expand Down Expand Up @@ -34,7 +33,7 @@ function Home() {
// const json = await response.json();
// console.log("hello")
// console.log(json)
navigate('/results',{state:{pdf:pdfBinary, pages:pages}})
navigate('/results', { state: { pdf: pdfBinary, pages: pages } })
}

const test_api = async () => {
Expand All @@ -53,7 +52,7 @@ function Home() {
<div className="home-container">
<div className="home-content">
<h1 className="title">MathSearch</h1>
<LaTeXInput/>
<LaTeXInput />
<UploadPDFToS3WithNativeSdk />
<button onClick={handleClick}>Redirect to results</button>
</div>
Expand Down
17 changes: 17 additions & 0 deletions front-end/mathsearch/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
Loading