import { Navigate, Outlet } from "react-router"; import { useAuth } from "../auth/useAuth"; /** Routes below need a session. Signed out goes to /signin. A locked session stays, under the lock screen. */ export function RequireAuth() { const { status } = useAuth(); if (status === "loading") return
Loading
; if (status === "anonymous") return ; return ; }