@@ -6,7 +6,6 @@ import { Suspense } from "react";
66import { removeCookie } from "./api/cookie" ;
77import ConnectParentsAndTeacher from "./components/RegularLesson/ConnectParentsAndTeacher" ;
88import AfterSignup from "./components/welcomeSignup/AfterSignup" ;
9- import AllowAlert from "./components/welcomeSignup/AllowAlert" ;
109import ChangeSchedule from "./pages/ChangeSchedule" ;
1110import CompleteCheckAttendance from "./pages/CompleteCheckAttendance" ;
1211import EditSchedule from "./pages/EditSchedule" ;
@@ -39,70 +38,69 @@ import TimePickerPage from "./pages/TimePickerPage";
3938import TuitionPayment from "./pages/TuitionPayment" ;
4039import WelcomeSignup from "./pages/WelcomeSignup" ;
4140import PrivateRoute from "./utils/common/privateRoute" ;
42- interface fallbackProps {
43- error : Error ;
44- resetError : ( ) => void ;
45- }
41+ interface fallbackProps {
42+ error : Error ;
43+ resetError : ( ) => void ;
44+ }
4645
4746export default function Router ( ) {
48-
4947 return (
5048 < BrowserRouter >
5149 < Sentry . ErrorBoundary fallback = { fallbackRender } >
5250 { /* <ErrorBoundary FallbackComponent={fallbackRender}> */ }
53- < Suspense fallback = { < Loading /> } >
54- < Routes >
55- < Route path = "/" element = { < OnBoarding /> } />
56- < Route path = "/landing" element = { < Landing /> } />
57- < Route path = "/on-boarding" element = { < OnBoarding /> } />
58- < Route path = "/welcome" element = { < WelcomeSignup /> } />
59- < Route path = "/:lessonId" element = { < ConnectParentsAndTeacher /> } />
60- < Route path = "/signup" element = { < Signup /> } />
61- < Route path = "/login" element = { < Login /> } />
62- < Route path = "/lesson-share" element = { < LessonShare /> } />
63- < Route path = "/kakao-redirect" element = { < KakaoRedirect /> } />
64- < Route path = "/naver-redirect" element = { < NaverRedirect /> } />
51+ < Suspense fallback = { < Loading /> } >
52+ < Routes >
53+ < Route path = "/" element = { < OnBoarding /> } />
54+ < Route path = "/landing" element = { < Landing /> } />
55+ < Route path = "/on-boarding" element = { < OnBoarding /> } />
56+ < Route path = "/welcome" element = { < WelcomeSignup /> } />
57+ < Route path = "/:lessonId" element = { < ConnectParentsAndTeacher /> } />
58+ < Route path = "/signup" element = { < Signup /> } />
59+ < Route path = "/login" element = { < Login /> } />
60+ < Route path = "/lesson-share" element = { < LessonShare /> } />
61+ < Route path = "/kakao-redirect" element = { < KakaoRedirect /> } />
62+ < Route path = "/naver-redirect" element = { < NaverRedirect /> } />
6563
66- < Route element = { < PrivateRoute authentication = { true } /> } >
67- < Route path = "/home" element = { < Home /> } />
68- < Route path = "/complete-check-attendance" element = { < CompleteCheckAttendance /> } />
69- < Route path = "/manage-lesson" element = { < ManageLessonMain /> } />
70- < Route path = "/manage-lesson/:manageLessonId" element = { < ManageLessonDetail /> } />
71- < Route path = "/register-payment/:manageLessonId" element = { < RegisterPayment /> } />
72- < Route path = "/parent-calendar" element = { < ParentCalendar /> } />
73- < Route path = "/register-lesson" element = { < RegisterLesson /> } />
74- < Route path = "/regular-lesson-cycle" element = { < RegularLessonCycle /> } />
75- < Route path = "/regular-lesson-date" element = { < RegularLessonDate /> } />
76- < Route path = "/regular-lesson" element = { < RegularLesson /> } />
77- < Route path = "/register-calendar" element = { < RegisterCalendar /> } />
78- < Route path = "/lesson-detail/:lessonId" element = { < LessonDetail /> } />
79- < Route path = "/time-picker" element = { < TimePickerPage /> } />
80- < Route path = "/schedule" element = { < ChangeSchedule /> } />
81- < Route path = "/tuition-payment" element = { < TuitionPayment /> } />
82- < Route path = "/register-complete" element = { < LessonRegisterComplete /> } />
83- < Route path = "/lesson-connect" element = { < LessonConnect /> } />
64+ < Route element = { < PrivateRoute authentication = { true } /> } >
65+ < Route path = "/home" element = { < Home /> } />
66+ < Route path = "/complete-check-attendance" element = { < CompleteCheckAttendance /> } />
67+ < Route path = "/manage-lesson" element = { < ManageLessonMain /> } />
68+ < Route path = "/manage-lesson/:manageLessonId" element = { < ManageLessonDetail /> } />
69+ < Route path = "/register-payment/:manageLessonId" element = { < RegisterPayment /> } />
70+ < Route path = "/parent-calendar" element = { < ParentCalendar /> } />
71+ < Route path = "/register-lesson" element = { < RegisterLesson /> } />
72+ < Route path = "/regular-lesson-cycle" element = { < RegularLessonCycle /> } />
73+ < Route path = "/regular-lesson-date" element = { < RegularLessonDate /> } />
74+ < Route path = "/regular-lesson" element = { < RegularLesson /> } />
75+ < Route path = "/register-calendar" element = { < RegisterCalendar /> } />
76+ < Route path = "/lesson-detail/:lessonId" element = { < LessonDetail /> } />
77+ < Route path = "/time-picker" element = { < TimePickerPage /> } />
78+ < Route path = "/schedule" element = { < ChangeSchedule /> } />
79+ < Route path = "/tuition-payment" element = { < TuitionPayment /> } />
80+ < Route path = "/register-complete" element = { < LessonRegisterComplete /> } />
81+ < Route path = "/lesson-connect" element = { < LessonConnect /> } />
8482
85- < Route path = "/myPage" element = { < MyPage /> } />
86- < Route path = "/no-attendance-check" element = { < NoAttendanceCheck /> } />
87- < Route path = "/lesson-info/:lessonId" element = { < LessonInfo /> } />
88- < Route path = "/edit-lessonschedule" element = { < EditSchedule /> } />
89- < Route path = "/alert" element = { < AllowAlert /> } />
90- < Route path = "/tree" element = { < AfterSignup /> } />
91- </ Route >
92- </ Routes >
93- </ Suspense >
83+ < Route path = "/myPage" element = { < MyPage /> } />
84+ < Route path = "/no-attendance-check" element = { < NoAttendanceCheck /> } />
85+ < Route path = "/lesson-info/:lessonId" element = { < LessonInfo /> } />
86+ < Route path = "/edit-lessonschedule" element = { < EditSchedule /> } />
87+ { /* <Route path="/alert" element={<AllowAlert />} /> */ }
88+ < Route path = "/tree" element = { < AfterSignup /> } />
89+ </ Route >
90+ </ Routes >
91+ </ Suspense >
9492 { /* </ErrorBoundary> */ }
9593 </ Sentry . ErrorBoundary >
9694 </ BrowserRouter >
9795 ) ;
9896}
9997
100- function fallbackRender ( { error, resetError } :fallbackProps ) {
101- if ( error instanceof AxiosError && error . response ?. status === 401 ) {
102- resetError ( ) ;
103- removeCookie ( "accessToken" ) ;
104- return < Navigate to = "/" /> ;
98+ function fallbackRender ( { error, resetError } : fallbackProps ) {
99+ if ( error instanceof AxiosError && error . response ?. status === 401 ) {
100+ resetError ( ) ;
101+ removeCookie ( "accessToken" ) ;
102+ return < Navigate to = "/" /> ;
105103 } else {
106- return < ErrorPage resetErrorBoundary = { resetError } /> ;
104+ return < ErrorPage resetErrorBoundary = { resetError } /> ;
107105 }
108106}
0 commit comments