We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e74eba commit 95e2bdeCopy full SHA for 95e2bde
src/hooks/useLogout.ts
@@ -2,13 +2,15 @@
2
3
import { useRouter } from 'next/navigation';
4
import { useQueryClient } from '@tanstack/react-query';
5
+import { notify } from '@/store/useToastStore';
6
7
export const useLogout = () => {
8
const queryClient = useQueryClient();
9
const router = useRouter();
10
11
const logout = () => {
12
document.cookie = 'token=; max-age=0; path=/;';
13
+ notify('success', '로그아웃을 하였습니다', 3000);
14
queryClient.clear();
15
router.push('/signin');
16
};
0 commit comments