@@ -30,144 +30,50 @@ import EmailEditPage from '../../pages/dashboard/ui/mail/EmailEditPage';
3030import PaymentPage from '../../pages/payment/ui/PaymentPage' ;
3131import TicketConfirmPage from '../../pages/dashboard/ui/ticket/TIcketConfirmPage' ;
3232
33- const routesConfig = [
34- {
35- path : MAIN_ROUTES . main ,
36- element : < MainPage /> ,
37- requiresAuth : false ,
38- } ,
39- {
40- path : JOIN_ROUTES . agreement , // 회원가입 경로 추가
41- element : < AgreementPage /> ,
42- requiresAuth : false ,
43- } ,
44- {
45- path : JOIN_ROUTES . infoInput , // 회원가입 경로 추가
46- element : < InfoInputPage /> ,
47- requiresAuth : false ,
48- } ,
49- {
50- path : MAIN_ROUTES . eventCreation ,
51- element : < FunnelPage /> ,
52- requiresAuth : false ,
53- } ,
54- {
55- path : MAIN_ROUTES . allEvents ,
56- element : < AllEventsPage /> ,
57- requiresAuth : false ,
58- } ,
59- {
60- path : MAIN_ROUTES . eventDatail ,
61- element : < EventDetailsPage /> ,
62- requiresAuth : false ,
63- } ,
64- {
65- path : MAIN_ROUTES . search ,
66- element : < SearchPage /> ,
67- requiresAuth : false ,
68- } ,
69- {
70- path : MAIN_ROUTES . menu ,
71- element : < MenuPage /> ,
72- requiresAuth : false ,
73- } ,
74- {
75- path : MENU_ROUTES . myTicket ,
76- element : < MyTicketPage /> ,
77- requiresAuth : false ,
78- } ,
79- {
80- path : MENU_ROUTES . myHost ,
81- element : < MyHostPage /> ,
82- requiresAuth : false ,
83- } ,
84- {
85- path : MENU_ROUTES . hostDetail ,
86- element : < HostDetailPage /> ,
87- requiresAuth : false ,
88- } ,
89- {
90- path : MENU_ROUTES . hostEdit ,
91- element : < HostEditPage /> ,
92- requiresAuth : false ,
93- } ,
94- {
95- path : MENU_ROUTES . myPage ,
96- element : < MyPage /> ,
97- requiresAuth : false ,
98- } ,
99- {
100- path : MENU_ROUTES . hostInfo ,
101- element : < HostInfoPage /> ,
102- requiresAuth : false ,
103- } ,
104- {
105- path : DASHBOARD_ROUTES . dashboard ,
106- element : < DashboardPage /> ,
107- requiresAuth : false ,
108- } ,
109- {
110- path : DASHBOARD_ROUTES . eventInfo ,
111- element : < EventInfoPage /> ,
112- requiresAuth : false ,
113- } ,
114- {
115- path : DASHBOARD_ROUTES . eventDetail ,
116- element : < EventDetailPage /> ,
117- requiresAuth : false ,
118- } ,
119- {
120- path : DASHBOARD_ROUTES . eventTag ,
121- element : < EventTagPage /> ,
122- requiresAuth : false ,
123- } ,
124- {
125- path : DASHBOARD_ROUTES . ticketCreate ,
126- element : < TicketCreatePage /> ,
127- requiresAuth : false ,
128- } ,
129- {
130- path : DASHBOARD_ROUTES . ticket ,
131- element : < TicketListPage /> ,
132- requiresAuth : false ,
133- } ,
134- {
135- path : DASHBOARD_ROUTES . email ,
136- element : < EmailPage /> ,
137- requiresAuth : false ,
138- } ,
139- {
140- path : DASHBOARD_ROUTES . mailBox ,
141- element : < MailBoxPage /> ,
142- requiresAuth : false ,
143- } ,
144- {
145- path : MAIN_ROUTES . payment ,
146- element : < PaymentPage /> ,
147- requiresAuth : false ,
148- } ,
149- {
150- path : PAYMENT_ROUTES . cardRegister ,
151- element : < CardRegisterPage /> ,
152- requiresAuth : false ,
153- } ,
154- {
155- path : DASHBOARD_ROUTES . emailEdit ,
156- element : < EmailEditPage /> ,
157- requiresAuth : false ,
158- } ,
159- {
160- path : DASHBOARD_ROUTES . participantsMangement ,
161- element : < ParticipantsManagementPage /> ,
162- requiresAuth : false ,
163- } ,
164- {
165- path : PAYMENT_ROUTES . ticketConfirm ,
166- element : < TicketConfirmPage /> ,
167- requiresAuth : false ,
168- } ,
33+ const mainRoutes = [
34+ { path : MAIN_ROUTES . main , element : < MainPage /> , requiresAuth : false } ,
35+ { path : MAIN_ROUTES . eventCreation , element : < FunnelPage /> , requiresAuth : false } ,
36+ { path : MAIN_ROUTES . allEvents , element : < AllEventsPage /> , requiresAuth : false } ,
37+ { path : MAIN_ROUTES . eventDatail , element : < EventDetailsPage /> , requiresAuth : false } ,
38+ { path : MAIN_ROUTES . search , element : < SearchPage /> , requiresAuth : false } ,
39+ { path : MAIN_ROUTES . menu , element : < MenuPage /> , requiresAuth : false } ,
40+ { path : MAIN_ROUTES . payment , element : < PaymentPage /> , requiresAuth : false } ,
16941] ;
17042
43+ const joinRoutes = [
44+ { path : JOIN_ROUTES . agreement , element : < AgreementPage /> , requiresAuth : false } ,
45+ { path : JOIN_ROUTES . infoInput , element : < InfoInputPage /> , requiresAuth : false } ,
46+ ] ;
47+
48+ const menuRoutes = [
49+ { path : MENU_ROUTES . myTicket , element : < MyTicketPage /> , requiresAuth : false } ,
50+ { path : MENU_ROUTES . myHost , element : < MyHostPage /> , requiresAuth : false } ,
51+ { path : MENU_ROUTES . hostDetail , element : < HostDetailPage /> , requiresAuth : false } ,
52+ { path : MENU_ROUTES . hostEdit , element : < HostEditPage /> , requiresAuth : false } ,
53+ { path : MENU_ROUTES . myPage , element : < MyPage /> , requiresAuth : false } ,
54+ { path : MENU_ROUTES . hostInfo , element : < HostInfoPage /> , requiresAuth : false } ,
55+ ] ;
56+
57+ const dashboardRoutes = [
58+ { path : DASHBOARD_ROUTES . dashboard , element : < DashboardPage /> , requiresAuth : false } ,
59+ { path : DASHBOARD_ROUTES . eventInfo , element : < EventInfoPage /> , requiresAuth : false } ,
60+ { path : DASHBOARD_ROUTES . eventDetail , element : < EventDetailPage /> , requiresAuth : false } ,
61+ { path : DASHBOARD_ROUTES . eventTag , element : < EventTagPage /> , requiresAuth : false } ,
62+ { path : DASHBOARD_ROUTES . ticketCreate , element : < TicketCreatePage /> , requiresAuth : false } ,
63+ { path : DASHBOARD_ROUTES . ticket , element : < TicketListPage /> , requiresAuth : false } ,
64+ { path : DASHBOARD_ROUTES . email , element : < EmailPage /> , requiresAuth : false } ,
65+ { path : DASHBOARD_ROUTES . mailBox , element : < MailBoxPage /> , requiresAuth : false } ,
66+ { path : DASHBOARD_ROUTES . emailEdit , element : < EmailEditPage /> , requiresAuth : false } ,
67+ { path : DASHBOARD_ROUTES . participantsMangement , element : < ParticipantsManagementPage /> , requiresAuth : false } ,
68+ ] ;
69+
70+ const paymentRoutes = [
71+ { path : PAYMENT_ROUTES . cardRegister , element : < CardRegisterPage /> , requiresAuth : false } ,
72+ { path : PAYMENT_ROUTES . ticketConfirm , element : < TicketConfirmPage /> , requiresAuth : false } ,
73+ ] ;
74+
75+ const routesConfig = [ ...mainRoutes , ...joinRoutes , ...menuRoutes , ...dashboardRoutes , ...paymentRoutes ] ;
76+
17177const router = createBrowserRouter (
17278 routesConfig . map ( route => ( {
17379 path : route . path ,
0 commit comments