fix family screen adaptation
This commit is contained in:
@@ -44,10 +44,8 @@ export function IdShell({
|
||||
</div>
|
||||
<main
|
||||
className={cn(
|
||||
'pb-[calc(4.5rem+env(safe-area-inset-bottom))] lg:pb-8 lg:pt-8 lg:pl-[220px] lg:pr-8',
|
||||
fullBleed
|
||||
? 'px-0 pt-0 lg:px-8'
|
||||
: 'px-0 pt-14 lg:px-0'
|
||||
'pb-[calc(4.5rem+env(safe-area-inset-bottom))] lg:pb-8 lg:pl-[220px] lg:pr-8',
|
||||
fullBleed ? 'px-0 pt-0 lg:pt-8' : 'px-0 pt-14 lg:pt-8'
|
||||
)}
|
||||
>
|
||||
<div
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { FileText, Heart, Home, LockKeyhole, LogOut, ShieldCheck, UserRound } from 'lucide-react';
|
||||
import { FamilySidebarPanel } from '@/components/family/family-sidebar-panel';
|
||||
import { BrandLogo } from '@/components/id/brand-logo';
|
||||
@@ -18,6 +19,8 @@ const baseItems = [
|
||||
|
||||
export function Sidebar({ active }: { active: string }) {
|
||||
const { logout, user } = useAuth();
|
||||
const pathname = usePathname();
|
||||
const onFamilyChatPage = Boolean(pathname && /^\/family\/[^/]+$/.test(pathname));
|
||||
const items = user?.canAccessAdmin
|
||||
? [...baseItems, { href: getAdminLandingPath(user), label: 'Админка', icon: ShieldCheck }]
|
||||
: baseItems;
|
||||
@@ -44,7 +47,7 @@ export function Sidebar({ active }: { active: string }) {
|
||||
))}
|
||||
</nav>
|
||||
<div className="min-h-0 flex-1 overflow-hidden">
|
||||
<FamilySidebarPanel />
|
||||
{!onFamilyChatPage ? <FamilySidebarPanel /> : null}
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user