-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
32 lines (29 loc) · 911 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
31
32
import React, { Suspense } from 'react';
import { Route, Routes } from 'react-router-dom';
import './assets/styles/main.scss';
import { Loader } from './components';
import AlertState from './context/alert/AlertState';
import GithubState from './context/github/GithubState';
import Home from './pages/Home';
import NotFound from './pages/NotFound';
import Repositories from './pages/Repositories';
const App = () => {
return (
<GithubState>
<AlertState>
<Suspense fallback={<Loader />}>
<Routes>
<Route exact path="/" element={<Home title="Users" />} />
<Route
exact
path="/repositories"
element={<Repositories title="Repositories" />}
/>
<Route path="*" element={<NotFound />} />
</Routes>
</Suspense>
</AlertState>
</GithubState>
);
};
export default App;