Skip to content

Commit

Permalink
Merge pull request #55 from CornellDataScience/add_index
Browse files Browse the repository at this point in the history
add back index.js
  • Loading branch information
zhangtravis authored Nov 21, 2023
2 parents b5b2df3 + 2ae6153 commit 0bb1b52
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
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();

0 comments on commit 0bb1b52

Please sign in to comment.