-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrouter.tsx
73 lines (72 loc) · 1.8 KB
/
router.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
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
import { createBrowserRouter } from 'react-router-dom';
import App from './App';
import SignUp from './pages/signUp/signUp';
import Login from './pages/login/login';
import Main from './pages/main/main';
import MyPage from './pages/myPage/myPage';
import Detail from './pages/detail/detail';
import Write from './pages/write/write';
import UserInfo from './pages/myPage/modifyInfo';
import SplashTransition from './pages/splash/splashTransition';
import SearchPage from './pages/search/searchPage';
import KakaoRedirect from './pages/login/kakaoRedirect';
export const router = createBrowserRouter(
[
{
path: '/',
element: <App />,
children: [
{
index: true,
element: <SplashTransition />,
},
{
path: 'sign-up',
element: <SignUp />,
},
{
path: 'login',
element: <Login />,
},
{
path: '/users/login/kakao',
element: <KakaoRedirect />,
},
{
path: 'main',
element: <Main />,
},
{
path: 'mypage/:_id',
element: <MyPage />,
},
{
path: 'userinfo/:_id',
element: <UserInfo />,
},
{
path: 'search',
element: <SearchPage />,
},
{
path: 'detail/:_id',
element: <Detail />,
},
{
path: 'write',
element: <Write />,
},
],
},
],
{
future: {
// 없으면 콘솔에 경고 표시
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
v7_relativeSplatPath: true,
v7_skipActionErrorRevalidation: true,
},
},
);