11import React from 'react' ;
22import { BrowserRouter , Route , Routes , Navigate } from 'react-router-dom' ;
3- import Home from './pages/Home' ;
4- import Login from './pages/Login' ;
5- import SignUp from './pages/SignUp' ;
6- import LoginComplete from './pages/Login/components/LoginComplete' ;
7- import TermsAgreement from './pages/TermsAgreement' ;
83
9- import MyPage from './pages/MyPage' ;
10- import ProfileEdit from './pages/ProfileEdit' ;
11- import AccountSetting from './pages/AccountSetting' ;
12- import AccountEdit from './pages/AccountEdit' ;
13- import AccountCancel from './pages/AccountCancel' ;
14- import Verification from './pages/verification' ;
4+ import Home from '@pages/Home' ;
5+ import Login from '@pages/Login' ;
6+ import LoginComplete from '@pages/Login/LoginComplete' ;
157
16- import ProfileViewer from './pages/ProfileViewer' ;
8+ import SignUp from '@pages/SignUp' ;
9+ import TermsAgreement from '@pages/SignUp/TermsAgreement' ;
1710
18- import Post from './pages/Post' ;
19- import MyPost from './pages/MyPost' ;
20- import PostUpload from './pages/PostUpload' ;
21- import PostImageSelect from './pages/PostImageSelect' ;
22- import PostInstaConnect from './pages/PostInstaConnect' ;
23- import PostInstaFeedSelect from './pages/PostInstaFeedSelect' ;
11+ import Profile from '@pages/Profile' ;
12+ import ProfileEdit from '@pages/Profile/ProfileEdit' ;
2413
25- import Chats from './pages/Chats' ;
26- import ChatRoom from './pages/Chats/ChatRoom' ;
14+ import AccountSetting from '@pages/Account/AccountSetting' ;
15+ import AccountEdit from '@pages/Account/AccountEdit' ;
16+ import AccountCancel from '@pages/Account/AccountCancel' ;
17+ import Verification from '@pages/Account/Verification' ;
2718
28- import NotFound from './pages/NotFound' ;
19+ import Post from '@pages/Post' ;
20+ import PostUpload from '@pages/Post/PostUpload' ;
21+ import PostImageSelect from '@pages/Post/PostImageSelect' ;
22+ import PostInstaConnect from '@pages/Post/PostInstaConnect' ;
23+ import PostInstaFeedSelect from '@pages/Post/PostInstaFeedSelect' ;
24+
25+ import Chats from '@pages/Chats' ;
26+ import ChatRoom from '@pages/Chats/ChatRoom' ;
27+
28+ import NotFound from '@pages/NotFound' ;
2929
3030const ProtectedRoute = ( { children } : { children : JSX . Element } ) => {
3131 const isAuthenticated = Boolean ( localStorage . getItem ( 'new_jwt_token' ) ) ;
@@ -36,21 +36,21 @@ const ProtectedRoute = ({ children }: { children: JSX.Element }) => {
3636const protectedRoutes = [
3737 { path : '/' , element : < Home /> } ,
3838
39- // 사용자 프로필 및 계정 관리
40- { path : '/mypage ' , element : < MyPage /> } ,
39+ // profile
40+ { path : '/profile/:userId ' , element : < Profile /> } ,
4141 { path : '/profile/edit' , element : < ProfileEdit /> } ,
42- { path : '/account-setting' , element : < AccountSetting /> } ,
43- { path : '/account-edit' , element : < AccountEdit /> } ,
44- { path : '/account-cancel' , element : < AccountCancel /> } ,
45- { path : '/verification' , element : < Verification /> } ,
46- { path : '/users/:userId' , element : < ProfileViewer /> } ,
42+
43+ // account
44+ { path : '/account/setting' , element : < AccountSetting /> } ,
45+ { path : '/account/edit' , element : < AccountEdit /> } ,
46+ { path : '/account/cancel' , element : < AccountCancel /> } ,
47+ { path : '/account/verification' , element : < Verification /> } ,
4748
4849 { path : '/post/:postId' , element : < Post /> } ,
49- { path : '/my-post/:postId' , element : < MyPost /> } ,
50- { path : '/upload' , element : < PostUpload /> } ,
51- { path : '/image-select' , element : < PostImageSelect /> } ,
52- { path : '/insta-connect' , element : < PostInstaConnect /> } ,
53- { path : '/insta-feed-select' , element : < PostInstaFeedSelect /> } ,
50+ { path : '/post/upload/photo/select' , element : < PostImageSelect /> } ,
51+ { path : '/post/upload/instagram/connect' , element : < PostInstaConnect /> } ,
52+ { path : '/post/upload/instagram/select' , element : < PostInstaFeedSelect /> } ,
53+ { path : '/post/upload/content' , element : < PostUpload /> } ,
5454
5555 // 메시지/채팅
5656 { path : '/chats' , element : < Chats /> } ,
@@ -60,9 +60,10 @@ const protectedRoutes = [
6060// 인증이 필요 없는 페이지 배열
6161const publicRoutes = [
6262 { path : '/login' , element : < Login /> } ,
63- { path : '/signup' , element : < SignUp /> } ,
6463 { path : '/login/complete' , element : < LoginComplete /> } ,
65- { path : '/terms-agreement' , element : < TermsAgreement /> } ,
64+
65+ { path : '/signup' , element : < SignUp /> } ,
66+ { path : '/signup/terms-agreement' , element : < TermsAgreement /> } ,
6667] ;
6768
6869const App : React . FC = ( ) => {
0 commit comments