-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.jsx
More file actions
59 lines (52 loc) · 1.74 KB
/
App.jsx
File metadata and controls
59 lines (52 loc) · 1.74 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import React, { useState } from 'react'
import {
BrowserRouter as Router,
Switch,
Route,
Link
} from "react-router-dom";
//components
import SignIn from './components/signin'
import SignUp from './components/signup'
import Home from './components/Home'
import UpdateProfile from './components/UpdateProfile'
import ForgotPassword from './components/ForgotPassword'
import SendVerifyLink from './components/SendVerifyLink'
// context
import { AuthProvider } from './context/AuthContext'
// Route
import PrivateRoute from './route/PrivateRoute'
function App() {
return (
<Router>
<AuthProvider>
<Switch>
<Route path="/signin">
<SignIn />
</Route>
<Route path="/signup">
<SignUp />
</Route>
<Route path="/forgot-password">
<ForgotPassword />
</Route>
<PrivateRoute>
<Route exact path="/">
<Home />
</Route>
<Route path="/update-profile">
<UpdateProfile />
</Route>
<Route path="/send-email-link">
<SendVerifyLink btnName={'Send Email Link'} status={true} />
</Route>
<Route path="/verify-email-link">
<SendVerifyLink btnName={'Verify Email Link'} status={false} />
</Route>
</PrivateRoute>
</Switch>
</AuthProvider>
</Router>
)
}
export default App