-
Notifications
You must be signed in to change notification settings - Fork 226
/
App.js
30 lines (26 loc) · 1.01 KB
/
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 React, { lazy } from 'react'
import { BrowserRouter as Router, Switch, Route, Redirect } from 'react-router-dom'
import AccessibleNavigationAnnouncer from './components/AccessibleNavigationAnnouncer'
const Layout = lazy(() => import('./containers/Layout'))
const Login = lazy(() => import('./pages/Login'))
const CreateAccount = lazy(() => import('./pages/CreateAccount'))
const ForgotPassword = lazy(() => import('./pages/ForgotPassword'))
function App() {
return (
<>
<Router>
<AccessibleNavigationAnnouncer />
<Switch>
<Route path="/login" component={Login} />
<Route path="/create-account" component={CreateAccount} />
<Route path="/forgot-password" component={ForgotPassword} />
{/* Place new routes over this */}
<Route path="/app" component={Layout} />
{/* If you have an index page, you can remothis Redirect */}
<Redirect exact from="/" to="/login" />
</Switch>
</Router>
</>
)
}
export default App