aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/(dash)/layout.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/app/(dash)/layout.tsx')
-rw-r--r--apps/web/app/(dash)/layout.tsx15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/web/app/(dash)/layout.tsx b/apps/web/app/(dash)/layout.tsx
index dffa27fa..3ae4e76d 100644
--- a/apps/web/app/(dash)/layout.tsx
+++ b/apps/web/app/(dash)/layout.tsx
@@ -1,22 +1,27 @@
import Header from "./header";
import Menu from "./menu";
-import { ensureAuth } from "./actions";
import { redirect } from "next/navigation";
+import { auth } from "../../server/auth";
+import { Toaster } from "@repo/ui/shadcn/sonner";
async function Layout({ children }: { children: React.ReactNode }) {
- const info = await ensureAuth();
+ const info = await auth();
if (!info) {
return redirect("/signin");
}
return (
- <main className="h-screen flex flex-col p-4 relative">
- <Header />
+ <main className="h-screen flex flex-col">
+ <div className="fixed top-0 left-0 w-full">
+ <Header />
+ </div>
<Menu />
- {children}
+ <div className="w-full h-full px-2 md:px-0">{children}</div>
+
+ <Toaster />
</main>
);
}