-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
30 lines (25 loc) · 782 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import {Route, Routes} from 'react-router-dom';
import Heading from './components/Heading';
import TaskForm from './components/TaskForm';
import TaskList from './components/TaskList';
import {ContextProvider} from './context/GlobalState';
import './App.css';
function App() {
return (
<div>
<div className="h-screen text-white text-center p-10">
<div className="container mx-auto h-full">
<ContextProvider>
<Heading/>
<Routes>
<Route path='/' element={<TaskList />} />
<Route path='/add' element={<TaskForm/>} />
<Route path='/edit/:id' element={<TaskForm/>} />
</Routes>
</ContextProvider>
</div>
</div>
</div>
);
}
export default App;