Add mobile sidebar toggle for admin panel
Local Build and Deploy / deploy (push) Successful in 1m5s

This commit is contained in:
openhands committed 2026-07-13 19:17:27 +02:00
1 parent 7b67ef893c
commit adbd651350
2 files changed
+62 -3

No files matched your search

+3 -3
View File
@@ -3,6 +3,7 @@ import { redirect } from "next/navigation";
import type { ReactNode } from "react";
import { getTranslations } from "next-intl/server";
import { AdminNavLink } from "@/components/admin/admin-nav-link";
import { AdminMobileWrapper } from "@/components/admin/admin-mobile-wrapper";
import { requireStaff } from "@/lib/admin/guard";
import { prisma } from "@/lib/prisma";
import { siteSettings } from "@/lib/services/site-settings";
@@ -163,13 +164,12 @@ export default async function AdminLayout({ children }: { children: ReactNode })
}
return (
<div className="grid grid-cols-1 lg:grid-cols-[260px_minmax(0,1fr)] min-h-screen bg-[var(--admin-canvas)]">
<Sidebar staff={staff} />
<AdminMobileWrapper sidebar={<Sidebar staff={staff} />}>
<div className="flex flex-col min-w-0 p-5 lg:p-6">
<Topbar staff={staff} />
<section className="admin-page flex-1">{children}</section>
</div>
</div>
</AdminMobileWrapper>
);
}