Routes.js
1.88 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import React from 'react';
import { Switch, Redirect } from 'react-router-dom';
import { RouteWithLayout } from './components';
import { Main as MainLayout, Minimal as MinimalLayout } from './layouts';
import {
Dashboard as DashboardView,
RecentFileList as RecentFileListView,
MyDrive as MyDriveView,
SharedFileList as SharedFileView,
Trash as TrashView,
Icons as IconsView,
Account as AccountView,
Settings as SettingsView,
SignUp as SignUpView,
SignIn as SignInView,
NotFound as NotFoundView
} from './views';
const Routes = () => {
return (
<Switch>
<Redirect
exact
from="/"
to="/my-drive"
/>
<RouteWithLayout
component={MyDriveView}
exact
layout={MainLayout}
path="/my-drive"
/>
<RouteWithLayout
component={SharedFileView}
exact
layout={MainLayout}
path="/share"
/>
<RouteWithLayout
component={RecentFileListView}
exact
layout={MainLayout}
path="/recent"
/>
<RouteWithLayout
component={TrashView}
exact
layout={MainLayout}
path="/trash"
/>
<RouteWithLayout
component={AccountView}
exact
layout={MainLayout}
path="/account"
/>
<RouteWithLayout
component={SettingsView}
exact
layout={MainLayout}
path="/settings"
/>
<RouteWithLayout
component={SignUpView}
exact
layout={MinimalLayout}
path="/sign-up"
/>
<RouteWithLayout
component={SignInView}
exact
layout={MinimalLayout}
path="/sign-in"
/>
<RouteWithLayout
component={NotFoundView}
exact
layout={MinimalLayout}
path="/not-found"
/>
<Redirect to="/not-found" />
</Switch>
);
};
export default Routes;