Skip to content

Commit 95e2bde

Browse files
committed
Feat: 로그아웃 성공시 메시지
1 parent 3e74eba commit 95e2bde

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hooks/useLogout.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
import { useRouter } from 'next/navigation';
44
import { useQueryClient } from '@tanstack/react-query';
5+
import { notify } from '@/store/useToastStore';
56

67
export const useLogout = () => {
78
const queryClient = useQueryClient();
89
const router = useRouter();
910

1011
const logout = () => {
1112
document.cookie = 'token=; max-age=0; path=/;';
13+
notify('success', '로그아웃을 하였습니다', 3000);
1214
queryClient.clear();
1315
router.push('/signin');
1416
};

0 commit comments

Comments
 (0)