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