diff --git a/src/app/login/[role]/page.tsx b/src/app/login/[role]/page.tsx deleted file mode 100644 index 268b03e..0000000 --- a/src/app/login/[role]/page.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { notFound, redirect } from "next/navigation"; -import { roles, type Role } from "@/modules/auth/types"; - -export const dynamic = "force-dynamic"; - -export default async function RoleLoginCompatibilityPage({ params }: { params: Promise<{ role: string }> }) { - const { role } = await params; - if (!roles.includes(role as Role)) notFound(); - redirect(`/login?intent=${role}`); -} diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 8989635..088508b 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -1,85 +1,103 @@ import Link from "next/link"; import { redirect } from "next/navigation"; +import { UserRound, Search, Building2, Shield, ClipboardCheck } from "lucide-react"; import { getSession } from "@/modules/auth/session"; import { LoginForm } from "@/modules/auth/LoginForm"; import { ThemeToggle } from "@/modules/theme/ThemeToggle"; -import { isRole, type Role } from "@/modules/auth/types"; export const dynamic = "force-dynamic"; -const loginHints: Record = { - admin: "Admin access is detected after authentication.", - staff: "Staff access is detected after authentication.", - company: "Company contact access is detected after authentication.", - candidate: "Candidate access is detected after authentication.", - inspector: "Inspector access is detected after authentication." -}; +const roleNotes = [ + { icon: UserRound, label: "Students", detail: "Profile, jobs, hours, pay" }, + { icon: Search, label: "Staff", detail: "Requests, candidates, CVs, time" }, + { icon: Building2, label: "Companies", detail: "Requests, candidates, invoices" }, + { icon: Shield, label: "Admin", detail: "Finance, approvals, migration" }, + { icon: ClipboardCheck, label: "Inspectors", detail: "ID review, document queues" } +]; export default async function LoginPage({ searchParams }: { - searchParams: Promise<{ intent?: string; error?: string }>; + searchParams: Promise<{ error?: string }>; }) { const session = await getSession(); if (session) redirect("/app"); const params = await searchParams; - const intent = params.intent ?? null; - const hint = isRole(intent) ? loginHints[intent] : null; return ( -
-