Files
edr-platform/apps/edr-freight-web/backoffice/src/pages/NoAccessPage.tsx
2026-08-07 12:24:30 +00:00

33 lines
1.2 KiB
TypeScript

import { ShieldOff } from "lucide-react";
import { useAuth } from "@/auth/useAuth";
import { Button } from "@/components/ui/button";
/**
* Terminal page for an account with no freight permissions and no IAM admin
* role. Reached via `resolveLandingPath`, which needs one destination that can
* never bounce — every other page is permission-gated.
*/
export default function NoAccessPage() {
const { user, logout } = useAuth();
return (
<div className="flex min-h-screen items-center justify-center p-6">
<div className="w-full max-w-md space-y-4 rounded-lg border p-8 text-center">
<ShieldOff className="mx-auto h-10 w-10 text-muted-foreground" />
<h1 className="text-lg font-semibold">No access assigned</h1>
<p className="text-sm text-muted-foreground">
Your account has no permissions assigned yet, so there are no pages to
show. Contact your administrator to have a position or role assigned.
</p>
{user?.email ? (
<p className="text-xs text-muted-foreground">Signed in as {user.email}</p>
) : null}
<Button variant="outline" onClick={logout}>
Log out
</Button>
</div>
</div>
);
}