Fix desktop sidebar viewport clipping

This commit is contained in:
lizerk 2026-04-15 00:54:42 +03:00
parent 79b3c29594
commit c481401b87
2 changed files with 8 additions and 4 deletions

View File

@ -343,8 +343,10 @@ function LeftNav({ fixedDesktop = false }: { fixedDesktop?: boolean }) {
return (
<aside className="hidden w-64 flex-shrink-0 lg:block">
<div
className={`space-y-4 lg:max-h-[calc(100vh-7.5rem)] lg:overflow-y-auto lg:pb-2 ${
fixedDesktop ? "lg:fixed lg:top-[5.5rem] lg:w-64" : "lg:sticky lg:top-8"
className={`space-y-4 lg:overflow-y-auto ${
fixedDesktop
? "lg:fixed lg:top-0 lg:bottom-0 lg:w-64 lg:pt-[5.5rem] lg:pb-8"
: "lg:sticky lg:top-8 lg:max-h-[calc(100dvh-7.5rem)] lg:pb-2"
}`}
>
<LeftNavContent />

View File

@ -26,8 +26,10 @@ export const CalendarSidebar = memo(function CalendarSidebar(props: CalendarSide
return (
<aside className="hidden w-72 flex-shrink-0 space-y-4 lg:block">
<div
className={`space-y-4 lg:max-h-[calc(100vh-7.5rem)] lg:overflow-y-auto lg:pb-2 ${
fixedDesktop ? "lg:fixed lg:top-[5.5rem] lg:w-72" : "lg:sticky lg:top-8"
className={`space-y-4 lg:overflow-y-auto ${
fixedDesktop
? "lg:fixed lg:top-0 lg:bottom-0 lg:w-72 lg:pt-[5.5rem] lg:pb-8"
: "lg:sticky lg:top-8 lg:max-h-[calc(100dvh-7.5rem)] lg:pb-2"
}`}
>
<CalendarCard {...calendarProps} />