feat: add SidebarTrigger to mobile view in form admin layout

This commit is contained in:
2026-06-30 17:18:15 +07:00 Unverified
parent 01e97bb6c6
commit 2920520d41
+4 -1
View File
@@ -1,7 +1,7 @@
import { getServerSession } from "next-auth"; import { getServerSession } from "next-auth";
import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { authOptions } from "@/app/api/auth/[...nextauth]/route";
import { redirect } from "next/navigation"; import { redirect } from "next/navigation";
import { SidebarProvider } from "@/components/ui/sidebar"; import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar";
import { AdminSidebar } from "./client"; import { AdminSidebar } from "./client";
import { Metadata } from "next"; import { Metadata } from "next";
@@ -35,6 +35,9 @@ export default async function AdminFormLayout(
<div className="flex w-full bg-background text-foreground dark"> <div className="flex w-full bg-background text-foreground dark">
<AdminSidebar formId={params.id} /> <AdminSidebar formId={params.id} />
<div className="flex-1 overflow-hidden"> <div className="flex-1 overflow-hidden">
<div className="md:hidden p-2">
<SidebarTrigger />
</div>
{props.children} {props.children}
</div> </div>
</div> </div>