Skip to content

Commit

Permalink
feat: 로그인 하지 않은 사용자는 좋아요 버튼을 누를 수 없도록 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
minjongbaek committed Dec 2, 2023
1 parent b55f27d commit 8571a5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/bookshelf/[bookshelfId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export default function UserBookShelfPage({
};

const handleClickLikeButton = () => {
if (!isAuthed()) {
showToast({ message: '로그인 후 이용해주세요.', type: 'normal' });
return;
}

!data.isLiked ? likeBookshelf() : unlikeBookshelf();
};

Expand Down

0 comments on commit 8571a5e

Please sign in to comment.