Skip to content

Commit

Permalink
refactor: 레시피 상세 로그인 접근 해제 (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
hae-on authored Sep 27, 2024
1 parent 411f5e3 commit 6569264
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
6 changes: 0 additions & 6 deletions src/mocks/handlers/recipeHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ import mockRecipes from '../data/recipes.json';

export const recipeHandlers = [
rest.get('/api/recipes/:recipeId', (req, res, ctx) => {
// const { mockSessionId } = req.cookies;

// if (!mockSessionId) {
// return res(ctx.status(401));
// }

return res(ctx.status(200), ctx.json(recipeDetail), ctx.delay(1000));
}),

Expand Down
19 changes: 10 additions & 9 deletions src/router/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ const router = createBrowserRouter([
return { Component: MemberRecipeBookmarkPage };
},
},
{
path: `${PATH.RECIPE}/:recipeId`,
async lazy() {
const { RecipeDetailPage } = await import(
/* webpackChunkName: "RecipeDetailPage" */ '@/pages/RecipeDetailPage/RecipeDetailPage'
);
return { Component: RecipeDetailPage };
},
},
],
},
/** 레이아웃이 있는 페이지 */
Expand Down Expand Up @@ -141,6 +132,16 @@ const router = createBrowserRouter([
},
],
},
/** 레시피 상세 페이지 */
{
path: `${PATH.RECIPE}/:recipeId`,
async lazy() {
const { RecipeDetailPage } = await import(
/* webpackChunkName: "RecipeDetailPage" */ '@/pages/RecipeDetailPage/RecipeDetailPage'
);
return { Component: RecipeDetailPage };
},
},
/** 검색 페이지 */
{
path: '/',
Expand Down

0 comments on commit 6569264

Please sign in to comment.