Skip to content

Commit 38848b8

Browse files
committed
Home Page
Started the home page
1 parent 18237f2 commit 38848b8

File tree

157 files changed

+161177
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+161177
-38
lines changed

docai/Backend/HelloWorld.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# import flast module
2+
from flask import Flask
3+
4+
# instance of flask application
5+
app = Flask(__name__)
6+
7+
# home route that returns below text when root url is accessed
8+
@app.route("/")
9+
def hello_world():
10+
return "<p>Hello, World!</p>"
11+
12+
if __name__ == '__main__':
13+
app.run()

docai/package-lock.json

+42-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docai/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"@testing-library/user-event": "^13.5.0",
99
"react": "^18.3.1",
1010
"react-dom": "^18.3.1",
11+
"react-router-dom": "^6.27.0",
1112
"react-scripts": "5.0.1",
1213
"web-vitals": "^2.1.4"
1314
},

docai/src/App.js

+8-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
1-
import logo from './logo.svg';
1+
//import logo from './logo.svg';
22
import './App.css';
3+
import { Routes, Route } from 'react-router-dom';
4+
import Home from './components/Home/Home';
35

46
function App() {
57
return (
68
<div className="App">
7-
<header className="App-header">
8-
<img src={logo} className="App-logo" alt="logo" />
9-
<p>
10-
Edit <code>src/App.js</code> and save to reload.
11-
</p>
12-
<a
13-
className="App-link"
14-
href="https://reactjs.org"
15-
target="_blank"
16-
rel="noopener noreferrer"
17-
>
18-
Learn React
19-
</a>
20-
</header>
9+
<Routes>
10+
<Route path="/" element={<Home />} />
11+
<Route path="/home" element={<Home />} />
12+
</Routes>
2113
</div>
2214
);
2315
}
2416

25-
export default App;
17+
export default App;

docai/src/components/Home/Home.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.buttons {
2+
text-align: center;
3+
}

docai/src/components/Home/Home.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
//import { useNavigate } from 'react-router-dom';
3+
import "./Home.css";
4+
5+
const Home = () => {
6+
//const navigate = useNavigate();
7+
8+
return (
9+
<div>
10+
<h1>Chat with DocAI</h1>
11+
<div className = "buttons"></div>
12+
<button> GET STARTED </button>
13+
<p> </p>
14+
<button> LEARN MORE </button>
15+
</div>
16+
17+
);
18+
};
19+
20+
export default Home; // Make sure this export is present

docai/src/index.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
44
import App from './App';
5-
import reportWebVitals from './reportWebVitals';
5+
import { BrowserRouter } from 'react-router-dom';
66

77
const root = ReactDOM.createRoot(document.getElementById('root'));
88
root.render(
99
<React.StrictMode>
10-
<App />
10+
<BrowserRouter>
11+
<App />
12+
</BrowserRouter>
1113
</React.StrictMode>
12-
);
13-
14-
// If you want to start measuring performance in your app, pass a function
15-
// to log results (for example: reportWebVitals(console.log))
16-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17-
reportWebVitals();
14+
);

node_modules/.bin/loose-envify

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/loose-envify.cmd

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/loose-envify.ps1

+28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.package-lock.json

+105
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)