1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 15:05:22 +02:00

Merge remote-tracking branch 'upstream/main' into fix-txn-sign

This commit is contained in:
Tyler Myracle 2024-01-20 12:07:05 -06:00
commit 3e5d3bd1b4

View file

@ -33,14 +33,16 @@ Sentry.init({
// Providers and components only relevant to a logged-in user
const WithAuth = function ({ children }: PropsWithChildren) {
const { data: session } = useSession()
const { data: session, status } = useSession()
const router = useRouter()
useEffect(() => {
if (status === 'loading') return
if (!session) {
router.push('/login')
}
}, [session, router])
}, [session, status, router])
if (session) {
return (