diff options
| author | Fuwn <[email protected]> | 2026-02-07 05:06:43 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-07 05:06:43 -0800 |
| commit | 80da73b5e10cc462745e921f79386773420aa646 (patch) | |
| tree | 79e02404591e4977fa9f923aed8b1f8cdf3219dc | |
| parent | fix: persist sidebar size across collapse/expand cycles (diff) | |
| download | asa.news-80da73b5e10cc462745e921f79386773420aa646.tar.xz asa.news-80da73b5e10cc462745e921f79386773420aa646.zip | |
fix: prevent sidebar max width from clamping persisted size on load
Return 35% max until subscriptions/feeds data loads. Previously the
useMemo computed a small max from just nav items on first render,
causing the library to clamp and overwrite the stored sidebar width.
| -rw-r--r-- | apps/web/app/reader/_components/reader-layout-shell.tsx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/web/app/reader/_components/reader-layout-shell.tsx b/apps/web/app/reader/_components/reader-layout-shell.tsx index 4952662..3ff2fa8 100644 --- a/apps/web/app/reader/_components/reader-layout-shell.tsx +++ b/apps/web/app/reader/_components/reader-layout-shell.tsx @@ -60,6 +60,7 @@ export function ReaderLayoutShell({ const sidebarMaxWidth = useMemo(() => { if (typeof window === "undefined") return "35%" + if (!subscriptionsData && !customFeedsData) return "35%" const canvas = document.createElement("canvas") const maybeContext = canvas.getContext("2d") |