Skip to content

Commit

Permalink
style: 각각 Router 아래에 주석 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
xodms0309 committed Oct 19, 2023
1 parent 236360f commit b702a49
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions frontend/src/router/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import CategoryProvider from '@/contexts/CategoryContext';
import NotFoundPage from '@/pages/NotFoundPage';

const router = createBrowserRouter([
/** 로그인이 안되었다면 로그인 페이지로 리다이렉트 */
{
path: '/',
element: (
Expand Down Expand Up @@ -74,6 +75,7 @@ const router = createBrowserRouter([
},
],
},
/** 헤더와 네비게이션 바가 있는 기본 레이아웃 */
{
path: '/',
element: (
Expand Down Expand Up @@ -101,6 +103,7 @@ const router = createBrowserRouter([
},
],
},
/** 헤더, 네비게이션 모두 없는 레이아웃 */
{
path: '/',
element: <App layout="minimal" />,
Expand All @@ -122,6 +125,7 @@ const router = createBrowserRouter([
},
],
},
/** 네비게이션 바 없이 헤더만 있는 레이아웃 */
{
path: '/',
element: (
Expand All @@ -140,17 +144,9 @@ const router = createBrowserRouter([
return { Component: ProductDetailPage };
},
},
{
path: `${PATH.RECIPE}/:recipeId`,
async lazy() {
const { RecipeDetailPage } = await import(
/* webpackChunkName: "RecipeDetailPage" */ '@/pages/RecipeDetailPage'
);
return { Component: RecipeDetailPage };
},
},
],
},
/** 네비게이션과 헤더(검색 아이콘이 없는)가 있는 레이아웃 */
{
path: '/',
element: (
Expand Down

0 comments on commit b702a49

Please sign in to comment.