Spaces:
Sleeping
Sleeping
File size: 1,343 Bytes
05c5ed5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | import { Think } from "ui/think";
import { getTranslations } from "next-intl/server";
import { FlipWords } from "ui/flip-words";
import { BackgroundPaths } from "ui/background-paths";
import { getSession } from "lib/auth/server";
import { redirect } from "next/navigation";
export default async function AuthLayout({
children,
}: { children: React.ReactNode }) {
const session = await getSession();
if (session) {
redirect("/");
}
const t = await getTranslations("Auth.Intro");
return (
<main className="relative w-full flex flex-col h-screen">
<div className="flex-1">
<div className="flex min-h-screen w-full">
<div className="hidden lg:flex lg:w-1/2 bg-muted border-r flex-col p-18 relative">
<div className="absolute inset-0 w-full h-full">
<BackgroundPaths />
</div>
<h1 className="text-xl font-semibold flex items-center gap-3 animate-in fade-in duration-1000">
<Think />
<span>Chat Bot</span>
</h1>
<div className="flex-1" />
<FlipWords
words={[t("description")]}
className=" mb-4 text-muted-foreground"
/>
</div>
<div className="w-full lg:w-1/2 p-6">{children}</div>
</div>
</div>
</main>
);
}
|