style: drop redundant comments and apply formatting
Frontend now uses double quotes and semicolons. No behaviour change.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { Navigate, Outlet, useLocation } from 'react-router'
|
||||
import { useAuth } from './AuthContext'
|
||||
import { Navigate, Outlet, useLocation } from "react-router";
|
||||
import { useAuth } from "./AuthContext";
|
||||
|
||||
export function RequireAuth() {
|
||||
const { user, loading } = useAuth()
|
||||
const location = useLocation()
|
||||
if (loading) return <p className="p-6 text-slate-500">Loading…</p>
|
||||
if (!user) return <Navigate to="/login" replace state={{ from: location }} />
|
||||
return <Outlet />
|
||||
const { user, loading } = useAuth();
|
||||
const location = useLocation();
|
||||
if (loading) return <p className="p-6 text-slate-500">Loading…</p>;
|
||||
if (!user) return <Navigate to="/login" replace state={{ from: location }} />;
|
||||
return <Outlet />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user