This commit is contained in:
2026-02-20 18:25:33 +00:00
parent ef1530b626
commit 25f5f74b1b
29 changed files with 1560 additions and 201 deletions
@@ -1,3 +1,5 @@
import { useMemo } from 'react';
import { useAuth } from 'hooks/useAuth';
import { Background } from './Background';
import { Header } from './Header';
import { Dock, dockItems } from './Dock';
@@ -6,12 +8,18 @@ type DashboardLayoutProps = {
children?: React.ReactNode;
};
export function DashboardLayout({ children }: DashboardLayoutProps) {
const { user } = useAuth();
const visibleItems = useMemo(
() => dockItems.filter((item) => !item.role || item.role === user?.role),
[user?.role],
);
return (
<div className="relative overflow-hidden h-dvh outline-none inset-0">
<Header />
<section className="relative h-dvh snap-start overflow-hidden">
<Background />
<Dock items={dockItems} />
<Dock items={visibleItems} />
<div className="absolute inset-0 z-2 pt-[52px] md:pt-[64px] pb-2 overflow-y-auto">
{children}
</div>