feat(web): standardize loading on shared skeleton recipes; retire '…' + empty status divs (#53)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { Navigate, Outlet } from "react-router-dom";
|
||||
|
||||
import { useMe } from "../api/queries";
|
||||
import { AppShellSkeleton } from "@/components/ui/skeletons";
|
||||
|
||||
export function RequireAuth() {
|
||||
const { data: user, isLoading } = useMe();
|
||||
|
||||
if (isLoading) return <div role="status" aria-label="loading" />;
|
||||
if (isLoading) return <AppShellSkeleton />;
|
||||
|
||||
if (!user) return <Navigate to="/login" replace />;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user