1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +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 // Providers and components only relevant to a logged-in user
const WithAuth = function ({ children }: PropsWithChildren) { const WithAuth = function ({ children }: PropsWithChildren) {
const { data: session } = useSession() const { data: session, status } = useSession()
const router = useRouter() const router = useRouter()
useEffect(() => { useEffect(() => {
if (status === 'loading') return
if (!session) { if (!session) {
router.push('/login') router.push('/login')
} }
}, [session, router]) }, [session, status, router])
if (session) { if (session) {
return ( return (