mirror of
https://github.com/woodchen-ink/Q58Connect.git
synced 2025-07-18 14:01:55 +08:00
refactor: 移除不必要的会话更新逻辑以简化导航栏组件
This commit is contained in:
parent
1083416b17
commit
5f196acb4a
@ -21,15 +21,11 @@ import { ThemeToggle } from "../theme-toggle";
|
||||
import { Button } from "../ui/button";
|
||||
|
||||
export function NavBar() {
|
||||
const { data: session, status, update } = useSession();
|
||||
const { data: session, status } = useSession();
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const user = session?.user;
|
||||
|
||||
useEffect(() => {
|
||||
update();
|
||||
}, [update]);
|
||||
|
||||
const handleSignOut = async () => {
|
||||
await signOut({ redirect: false });
|
||||
router.refresh();
|
||||
|
Loading…
x
Reference in New Issue
Block a user