Files
LexiChain/app/(dashboard)/contacts/layout.tsx

17 lines
300 B
TypeScript
Raw Normal View History

2026-03-25 13:52:45 +01:00
import { redirect } from "next/navigation";
import { auth } from "@clerk/nextjs/server";
export default async function ContactsLayout({
children,
}: {
children: React.ReactNode;
}) {
const { userId } = await auth();
if (!userId) {
redirect("/sign-in");
}
return <>{children}</>;
}