1
1
import ReactDOM from 'react-dom/client' ;
2
2
import { QueryClient , QueryClientProvider } from '@tanstack/react-query' ;
3
3
import './styles/index.css' ;
4
- import App from './App.tsx' ;
5
- import TextInputForm from './pages/InputFormTest.tsx' ;
6
4
import { createBrowserRouter , RouterProvider } from 'react-router-dom' ;
7
5
import ChangePasswordPage from './pages/ChangePasswordPage.tsx' ;
8
- import { JoinPage , LoginPage , ResetPwPage , NotFound , Policy } from './pages/index.ts' ;
6
+ import { JoinPage , LoginPage , NotFound , Policy , ResetPwPage } from './pages/index.ts' ;
9
7
import ProtectedRoute from './providers/ProtectedRoute.tsx' ;
10
8
import EditGroupSchedule from './pages/EditGroupSchedulePage.tsx' ;
11
9
import AddGroupSchedulePage from './pages/AddGroupSchedulePage.tsx' ;
12
10
import GroupSchedulePage from './pages/GroupSchedulePage.tsx' ;
13
11
import ProfilePage from './pages/ProfilePage.tsx' ;
12
+ import App from '@/App.tsx' ;
14
13
15
14
const router = createBrowserRouter ( [
16
15
{
17
16
path : '/' ,
17
+ element : < ProtectedRoute /> ,
18
18
children : [
19
19
{
20
20
index : true ,
21
- element : (
22
- < ProtectedRoute >
23
- < App />
24
- </ ProtectedRoute >
25
- ) ,
21
+ element : < App /> ,
26
22
} ,
27
23
{
28
24
path : '/group/:groupId/edit/:scheduleId' ,
@@ -37,50 +33,42 @@ const router = createBrowserRouter([
37
33
element : < AddGroupSchedulePage /> ,
38
34
} ,
39
35
{
40
- path : '/login' ,
41
- element : < LoginPage /> ,
42
- } ,
43
- {
44
- path : '/join' ,
45
- element : < JoinPage /> ,
46
- } ,
47
- {
48
- path : '/editPw' ,
49
- element : < ResetPwPage /> ,
50
- } ,
51
- {
52
- path : '/change-password' ,
53
- element : < ChangePasswordPage /> ,
54
- } ,
55
- {
56
- path : '*' ,
57
- element : < NotFound /> ,
58
- } ,
59
- {
60
- path : '/test' ,
61
- children : [
62
- {
63
- path : 'inputForm' ,
64
- element : < TextInputForm /> ,
65
- } ,
66
- ] ,
36
+ path : '/profile' ,
37
+ element : < ProfilePage /> ,
67
38
} ,
39
+ ] ,
40
+ } ,
41
+ {
42
+ path : '/login' ,
43
+ element : < LoginPage /> ,
44
+ } ,
45
+ {
46
+ path : '/join' ,
47
+ element : < JoinPage /> ,
48
+ } ,
49
+ {
50
+ path : '/editPw' ,
51
+ element : < ResetPwPage /> ,
52
+ } ,
53
+ {
54
+ path : '/change-password' ,
55
+ element : < ChangePasswordPage /> ,
56
+ } ,
57
+ {
58
+ path : '*' ,
59
+ element : < NotFound /> ,
60
+ } ,
61
+
62
+ {
63
+ path : '/policy' ,
64
+ children : [
68
65
{
69
- path : '/policy' ,
70
- children : [
71
- {
72
- path : 'personalInfo' ,
73
- element : < Policy . PersonalInfoPage /> ,
74
- } ,
75
- {
76
- path : 'usecondition' ,
77
- element : < Policy . UseConditionPage /> ,
78
- } ,
79
- ] ,
66
+ path : 'personalInfo' ,
67
+ element : < Policy . PersonalInfoPage /> ,
80
68
} ,
81
69
{
82
- path : '/profile ' ,
83
- element : < ProfilePage /> ,
70
+ path : 'usecondition ' ,
71
+ element : < Policy . UseConditionPage /> ,
84
72
} ,
85
73
] ,
86
74
} ,
0 commit comments