Files
mrp-qrcode/app/page.tsx
T
2026-04-20 15:49:01 -05:00

9 lines
262 B
TypeScript

import { redirect } from "next/navigation";
import { getCurrentUser } from "@/lib/auth";
export default async function IndexPage() {
const user = await getCurrentUser();
if (!user) redirect("/login");
redirect(user.role === "admin" ? "/admin" : "/op");
}