-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.tsx
36 lines (34 loc) · 981 Bytes
/
index.tsx
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
import { createBrowserRouter } from 'react-router-dom';
import App from '../App';
import ProtectedRoute from '../components/ProtectedRoute/ProtectedRoute';
import Home from '../pages/Home';
import Dashboard from '../pages/Dashboard';
import AccountSummary from '../pages/AccountSummary';
import TransferBalance from '../pages/TransferBalance/TransferBalance';
import Receive from '../pages/Receive/Receive';
const router = createBrowserRouter([
{
path: '/',
element: <App />,
children: [
{
index: true,
element: <Home />,
},
{
path: 'dashboard',
element: (
<ProtectedRoute>
<Dashboard />
</ProtectedRoute>
),
children: [
{ path: 'account-summary', element: <AccountSummary /> },
{ path: 'transfer-balance', element: <TransferBalance /> },
{ path: 'receive', element: <Receive /> },
],
},
],
},
]);
export { router };