Revert "fix(user): refresh profile on sidebar open"

This reverts commit 6e811b0e09.
This commit is contained in:
2026-06-30 13:07:50 +08:00
parent a99a6e056d
commit f4d0f76466
4 changed files with 19 additions and 16 deletions
-13
View File
@@ -1,6 +1,5 @@
"use client";
import { useEffect } from "react";
import { LogOut } from "lucide-react";
import { signOut } from "next-auth/react";
import { useRouter } from "next/navigation";
@@ -30,18 +29,6 @@ export function SidebarScreen() {
const auth = useAuthState();
const authDispatch = useAuthDispatch();
useEffect(() => {
if (!auth.hasInitialized || auth.isLoading) return;
if (auth.loginStatus === "notLoggedIn") return;
userDispatch({ type: "UserFetch" });
}, [
auth.hasInitialized,
auth.isLoading,
auth.loginStatus,
userDispatch,
]);
const handleLogoutClick = () => {
userDispatch({ type: "UserClearLocal" });
authDispatch({ type: "AuthLogoutSubmitted" });