Skip to content

Commit

Permalink
๐ŸŽจ Publish(#79): ๋กœ๊ทธ์•„์›ƒ ์‹œ ์‚ฌ์šฉ์ž ์ •๋ณด ์ดˆ๊ธฐํ™” ๊ธฐ๋Šฅ ์ถ”๊ฐ€
Browse files Browse the repository at this point in the history
  • Loading branch information
bluetree7878 committed Dec 27, 2024
1 parent 986ea3b commit f486b10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ProfileImage from '@features/user/ui/ProfileImage';
import { authQuery } from '@features/auth/queries';

export default function Header() {
const { user } = useUserStore();
const { user, clearUser } = useUserStore();
const { mutate: logout } = authQuery.logout();
const { isShow, openModal, closeModal, Modal } = useModal();
const navigate = useNavigate();
Expand All @@ -33,6 +33,7 @@ export default function Header() {
const handleLogout = () => {
logout(undefined, {
onSuccess: () => {
clearUser();
window.location.href = '/';
},
onError: error => {
Expand Down

0 comments on commit f486b10

Please sign in to comment.