Adds complete initial codebase for the RJ Bulk Supplies fuel delivery backoffice: - Authentication pages and protected route layouts - Customer, supplier, fuel purchase, and delivery note management - Custom reporting and customer statement sending tools - Full UI component library and Tailwind styling - Server actions, API routes, and PocketBase integration - Development scripts and project configuration updates - Updated README and package metadata
14 lines
422 B
TypeScript
14 lines
422 B
TypeScript
import { redirect } from "next/navigation";
|
|
import { getAuth } from "@/lib/auth";
|
|
|
|
export default async function AuthLayout({ children }: { children: React.ReactNode }) {
|
|
const { user } = await getAuth();
|
|
if (user) {
|
|
redirect("/dashboard");
|
|
}
|
|
return (
|
|
<div className="flex min-h-screen items-center justify-center bg-muted/40 p-4">
|
|
<div className="w-full max-w-md">{children}</div>
|
|
</div>
|
|
);
|
|
}
|