aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/(thinkpad)/layout.tsx
blob: 7e5b6e15b38769c866384a20b677ca9339df721c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { auth } from "@/server/auth";
import "./canvasStyles.css";
import { redirect } from "next/navigation";
import { Toaster } from "@repo/ui/shadcn/sonner";

export default async function RootLayout({
	children,
}: {
	children: React.ReactNode;
}) {
	const info = await auth();

	if (!info) {
		return redirect("/signin");
	}
	return (
		<div className="h-screen">
			<div>{children}</div>
			<Toaster />
		</div>
	);
}