add admin checks for admin pages and run biome formating 🔨
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s

This commit is contained in:
2025-07-25 13:31:12 +05:00
parent aedf7cdf7d
commit 9b2f2c1528
127 changed files with 6577 additions and 6334 deletions

View File

@ -1,6 +1,6 @@
import { redirect } from "next/navigation";
import { getServerSession } from "next-auth";
import { NuqsAdapter } from 'nuqs/adapters/next/app'
import { NuqsAdapter } from "nuqs/adapters/next/app";
import { getProfile } from "@/actions/user-actions";
import { authOptions } from "@/app/auth";
import { DeviceCartDrawer } from "@/components/device-cart";
@ -19,7 +19,9 @@ import { AccountPopover } from "./account-popver";
export async function ApplicationLayout({
children,
}: { children: React.ReactNode }) {
}: {
children: React.ReactNode;
}) {
const session = await getServerSession(authOptions);
if (!session) return redirect("/auth/signin");
@ -50,9 +52,7 @@ export async function ApplicationLayout({
/>
<DeviceCartDrawer />
<div className="p-4 flex flex-col flex-1 rounded-lg bg-background">
<NuqsAdapter>
{children}
</NuqsAdapter>
<NuqsAdapter>{children}</NuqsAdapter>
</div>
</SidebarInset>
</SidebarProvider>