11import { Route , Routes } from 'react-router-dom' ;
2- import NotFound from '@/pages/not-found' ;
32import { AuthCheckRoute } from '@components/common/AuthCheckRoute' ;
3+ import NotFound from './pages/not-found' ;
44import Test from '@pages/test.tsx' ;
55import ArtBuyerPage from './pages/artBuyerPage/ArtBuyerPage' ;
66import AuthorPage from './pages/authorPage/AuthorPage' ;
@@ -19,7 +19,6 @@ import { Main } from '@/pages/main';
1919import { ArtWork } from '@/pages/artwork' ;
2020import { ArtworkDetail } from '@/pages/artwork-detail' ;
2121import { AuctionDetail } from './pages/auction-detail' ;
22- import { LoginRedirect } from './pages/login-redirect' ;
2322type TRoutes = {
2423 path : string ;
2524 element : JSX . Element ;
@@ -31,37 +30,31 @@ type TRoutes = {
3130 * @author 홍규진
3231 * */
3332
33+ /**
34+ * 작품구매자_마이페이지는 /artBuyerPage 이고,
35+ * 작가_마이페이지는 /authorPage 로 구분했습니다.
36+ * @author 노찬영
37+ * */
38+
3439// eslint-disable-next-line react-refresh/only-export-components
3540export const routes : TRoutes [ ] = [
3641 { path : '/' , element : < Main /> , isTabBar : true } ,
37- {
38- path : '/mypage/art-buyer' ,
39- element : < ArtBuyerPage /> ,
40- isTabBar : true ,
41- isCheckAuth : true ,
42- } ,
43- {
44- path : '/mypage/author' ,
45- element : < AuthorPage /> ,
46- isTabBar : true ,
47- isCheckAuth : true ,
48- } ,
42+ { path : '/mypage/art-buyer' , element : < ArtBuyerPage /> , isTabBar : true } ,
43+ { path : '/mypage/author' , element : < AuthorPage /> , isTabBar : true } ,
4944
5045 { path : '/test' , element : < Test /> , isTabBar : true } ,
5146 { path : '/login' , element : < Login /> , isTabBar : true } ,
52- { path : '/login/redirect' , element : < LoginRedirect /> , isTabBar : true } ,
5347 { path : '/register' , element : < Register /> , isTabBar : true } ,
48+
5449 {
5550 path : '/artwork-register' ,
5651 element : < ArtworkRegister /> ,
5752 isTabBar : true ,
58- isCheckAuth : true ,
5953 } ,
6054 {
6155 path : '/auction-register' ,
6256 element : < AuctionRegister /> ,
6357 isTabBar : true ,
64- isCheckAuth : true ,
6558 } ,
6659 {
6760 path : '/author' ,
@@ -87,7 +80,6 @@ export const routes: TRoutes[] = [
8780 path : '/exhibit-register' ,
8881 element : < ExhibitRegister /> ,
8982 isTabBar : true ,
90- isCheckAuth : true ,
9183 } ,
9284 {
9385 path : '/auction' ,
@@ -98,8 +90,8 @@ export const routes: TRoutes[] = [
9890 path : '/auction/:id' ,
9991 element : < AuctionDetail /> ,
10092 isTabBar : true ,
101- isCheckAuth : true ,
10293 } ,
94+ { path : '/main' , element : < Main /> , isTabBar : true } ,
10395 { path : '/artwork' , element : < ArtWork /> , isTabBar : true } ,
10496 { path : '/artwork/:id' , element : < ArtworkDetail /> , isTabBar : true } ,
10597] ;
@@ -118,7 +110,7 @@ export default function Router() {
118110 key = { path }
119111 path = { path }
120112 element = {
121- < AuthCheckRoute redirectPath = "/login " > { element } </ AuthCheckRoute >
113+ < AuthCheckRoute redirectPath = "/" > { element } </ AuthCheckRoute >
122114 }
123115 />
124116 ) : (
0 commit comments