diff --git a/samples/todo/components/AuthGuard.tsx b/samples/todo/components/AuthGuard.tsx index d056e0cff..36ef8e254 100644 --- a/samples/todo/components/AuthGuard.tsx +++ b/samples/todo/components/AuthGuard.tsx @@ -8,9 +8,10 @@ export default function AuthGuard({ children }: Props) { const { status } = useSession(); if (status === 'loading') { return

Loading...

; - } - if (status === 'unauthenticated') { + } else if (status === 'unauthenticated') { signIn(); + return <>; + } else { + return <>{children}; } - return <>{children}; } diff --git a/samples/todo/components/Spaces.tsx b/samples/todo/components/Spaces.tsx index 437058979..936d029f8 100644 --- a/samples/todo/components/Spaces.tsx +++ b/samples/todo/components/Spaces.tsx @@ -6,7 +6,7 @@ export default function Spaces() { const spaces = find(); return ( -