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.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/web/app/(dash)/layout.tsx b/apps/web/app/(dash)/layout.tsx
index dffa27fa..3ec8926e 100644
--- a/apps/web/app/(dash)/layout.tsx
+++ b/apps/web/app/(dash)/layout.tsx
@@ -1,22 +1,25 @@
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">
+ <main className="h-screen flex flex-col p-4 relative ">
<Header />
<Menu />
{children}
+
+ <Toaster />
</main>
);
}