Skip to content

Commit

Permalink
feat: Uuid로 라우팅
Browse files Browse the repository at this point in the history
  • Loading branch information
eunbeann committed Jan 18, 2024
1 parent 7e0b18b commit 5ef11d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/LecueNote/page/LeceuNotePage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { useLocation, useNavigate, useParams } from 'react-router-dom';

import { useNavigate } from 'react-router-dom';
import Header from '../../../components/common/Header';
import CommonModal from '../../../components/common/Modal/CommonModal';
import CreateNote from '../../components/CreateNote';
Expand Down Expand Up @@ -33,6 +33,7 @@ function LecueNotePage() {

const putMutation = usePutPresignedUrl();
const postMutation = usePostLecueNote();
const { bookUuid } = useParams() as { bookUuid: string };

const handleClickCategory = (
e: React.MouseEvent<HTMLButtonElement, MouseEvent>,
Expand Down Expand Up @@ -80,8 +81,7 @@ function LecueNotePage() {
bgColor: clickedBgColor,
isIconClicked: isIconClicked,
});
// 추후 수정 예정
navigate(`/lecue-book`);
navigate(`/lecue-book/${bookUuid}`);
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function Router() {
<Route path="/" element={<SelectView />} />
<Route path="/register" element={<Register />} />
<Route path="/login" element={<Login />} />
<Route path="/create-note" element={<LecueNotePage />} />
<Route path="/create-note/:bookUuid" element={<LecueNotePage />} />
<Route path="/sticker-pack" element={<StickerPack />} />
<Route path="/detail" element={<DetailPage />} />
<Route path="/mypage" element={<Mypage />} />
Expand Down

0 comments on commit 5ef11d1

Please sign in to comment.