1
0
Fork 0
polaris-task-force/src/components/frontend/LandingPage.tsx
Z8MB1E 1f9f919443 feat(auth): add return-URL flow for login redirects
Add LoginLink client component that captures current path via usePathname()
and passes it as returnTo query param. Update login page to read and
sanitize returnTo (open-redirect guard: must start with /, reject //).
Update LoginForm to redirect to returnTo after successful login. Wire
LandingPage CTA through LoginLink. Add returnTo redirect for already-
authed users hitting /login. Add return-URL to flappy page redirect.
Remove trailing blank line from (frontend) layout.
2026-08-19 19:48:24 -04:00

22 lines
879 B
TypeScript

import { Button } from "@/components/ui/button";
import AppLogo from "@/components/graphics/AppLogo";
import { LoginLink } from "@/components/frontend/auth/LoginLink";
export function LandingPage() {
return (
<div className="min-h-screen flex flex-col items-center justify-center p-5 gap-6 bg-background">
<div className="flex flex-col items-center gap-3 text-center max-w-md">
<div className="w-[260px] pb-2 [&_img]:w-full [&_img]:h-auto">
<AppLogo />
</div>
<p className="text-sm text-muted-foreground">
Classified operations portal for Polaris Task Force, an Arma 3 unit. Log in to access the
operations dashboard, intelligence, and logistics.
</p>
<Button asChild className="mt-2">
<LoginLink>Log in to access the portal</LoginLink>
</Button>
</div>
</div>
);
}