Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 40 additions & 12 deletions apps/web/src/app/(main)/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,47 @@ export default function DashboardLayout({
</div>
)}
</AnimatePresence>
<div className="flex-1 flex flex-col h-full bg-ox-content">
<div className="xl:hidden flex items-center h-16 px-4 border-b border-ox-header bg-ox-content">
<IconWrapper onClick={() => setShowSidebar(true)}>
<Bars3Icon className="size-5 text-ox-purple" />
</IconWrapper>
<Link href="/" className="ml-4 text-lg font-semibold text-ox-white hover:text-ox-purple transition-colors">
Opensox
</Link>
{showSidebar && (
<div
onClick={() => setShowSidebar(false)}
className="fixed inset-0 xl:hidden"
>
<div className="flex-1 flex flex-col h-full bg-ox-content">
<div className="xl:hidden flex items-center h-16 px-4 border-b border-ox-header bg-ox-content">
<IconWrapper>
<Bars3Icon className="size-5 text-ox-purple" />
</IconWrapper>
<Link
href="/"
className="ml-4 text-lg font-semibold text-ox-white hover:text-ox-purple transition-colors"
>
Opensox
</Link>
</div>
<main className="flex-1 h-full overflow-auto bg-ox-content">
{children}
</main>
</div>
</div>
)}
{!showSidebar && (
<div className="flex-1 flex flex-col h-full bg-ox-content">
<div className="xl:hidden flex items-center h-16 px-4 border-b border-ox-header bg-ox-content">
<IconWrapper onClick={() => setShowSidebar(true)}>
<Bars3Icon className="size-5 text-ox-purple" />
</IconWrapper>
<Link
href="/"
className="ml-4 text-lg font-semibold text-ox-white hover:text-ox-purple transition-colors"
>
Opensox
</Link>
</div>
<main className="flex-1 h-full overflow-auto bg-ox-content">
{children}
</main>
</div>
<main className="flex-1 h-full overflow-auto bg-ox-content">
{children}
</main>
</div>
)}
</div>
);
}