fix(auth): correct session check in sign-out page

Change !session to !session?.user to properly detect unauthenticated
state. useSession() returns an object, not null.
This commit is contained in:
2026-04-06 23:23:08 -04:00
parent cfa93da149
commit 3b5934dbfd

View File

@@ -12,7 +12,7 @@ export default function SignOutPage() {
const router = useRouter()
useEffect(() => {
if (!session) {
if (!session?.user) {
router.push("/")
}
}, [session, router])
@@ -22,7 +22,7 @@ export default function SignOutPage() {
router.push("/")
}
if (isPending || !session) {
if (isPending || !session?.user) {
return null
}