Files
mrp-qrcode/app/page.tsx
T

9 lines
262 B
TypeScript
Raw Normal View History

2026-04-20 15:49:01 -05:00
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");
}