260303_01_ENH: TanStack Query 적용
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useRouter } from "next/navigation";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Menu, X, ZoomIn, ZoomOut, LogOut } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
@@ -29,6 +30,7 @@ export const Header = ({
|
||||
decreaseFontSize,
|
||||
increaseFontSize,
|
||||
}: HeaderProps) => {
|
||||
const router = useRouter();
|
||||
const { auth } = useAuth();
|
||||
const [userInfo, setUserInfo] = useState<LoginUser|undefined>(undefined);
|
||||
|
||||
@@ -37,7 +39,7 @@ export const Header = ({
|
||||
setUserInfo(auth.user);
|
||||
}
|
||||
else{
|
||||
window.location.replace("/logout");
|
||||
router.replace("/logout");
|
||||
}
|
||||
}, [auth.user])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user