Skip to content

Commit

Permalink
fix: bookId null이면 빈배열 보내기
Browse files Browse the repository at this point in the history
  • Loading branch information
eunbeann committed Jan 19, 2024
1 parent 62eca66 commit 216a02d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/LecueNote/page/LeceuNotePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function LecueNotePage() {
const postMutation = usePostLecueNote();
const location = useLocation();

const { bookId } = location.state;
const { bookId } = location.state || {};

const handleClickCategory = (
e: React.MouseEvent<HTMLButtonElement, MouseEvent>,
Expand Down
2 changes: 1 addition & 1 deletion src/StickerPack/page/StickerPack/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function StickerPack() {
const navigate = useNavigate();
const location = useLocation();

const { bookId } = location.state;
const { bookId } = location.state || {};

const [selectedStickerData, setSelectedStickerData] = useState<stickerType>({
stickerId: 0,
Expand Down

0 comments on commit 216a02d

Please sign in to comment.