Skip to content

Commit

Permalink
Merge pull request #102 from Moaguide-develop/feat/notification
Browse files Browse the repository at this point in the history
feat: 메인페이지 북마크 알랄트 상세페이지랑 동일하게 맞추기
  • Loading branch information
jiohjung98 authored Oct 24, 2024
2 parents 86dcaaa + eb413c4 commit bb3ad69
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/home/MainListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const MainListItem = ({
onSuccess: () => {
handleBookmarkInvalidate();
queryClient.invalidateQueries({ queryKey: ['bookmarks'] });
alert('북마크 삭제가 완료되었습니다');

if (currentTab === 'all') {
queryClient.invalidateQueries({ queryKey: ['MainProductLogin', category] });
Expand All @@ -57,6 +58,7 @@ const MainListItem = ({
onSuccess: () => {
handleBookmarkInvalidate();
queryClient.invalidateQueries({ queryKey: ['bookmarks'] });
alert('북마크 추가가 완료되었습니다');

if (currentTab === 'all') {
queryClient.invalidateQueries({ queryKey: ['MainProductLogin', category] });
Expand All @@ -69,6 +71,11 @@ const MainListItem = ({
}
};

const handleLogin = () => {
alert('로그인이 필요한 서비스입니다.');
router.push('/sign');
}

return (
<div className="mt-5 pb-5 border-b border-gray100">
<div className="flex gap-4 sm:gap-5">
Expand Down Expand Up @@ -118,6 +125,7 @@ const MainListItem = ({
src="/images/home/bookmark.svg"
alt="Bookmark"
className="w-[24px] h-[24px]"
onClick={handleLogin}
/>
)}
</div>
Expand Down

0 comments on commit bb3ad69

Please sign in to comment.