fix: fix hook rendering

This commit is contained in:
Stavros
2025-05-15 16:05:21 +03:00
parent 03f193090d
commit 76346fe835
5 changed files with 24 additions and 22 deletions

View File

@@ -17,13 +17,14 @@ import { toast } from "sonner";
export const LogoutPage = () => {
const { provider, username, isLoggedIn, email } = useUserContext();
const { genericName } = useAppContext();
const { t } = useTranslation();
if (!isLoggedIn) {
return <Navigate to="/login" />;
}
const { genericName } = useAppContext();
const { t } = useTranslation();
const logoutMutation = useMutation({
mutationFn: () => axios.post("/api/logout"),
mutationKey: ["logout"],