summaryrefslogtreecommitdiff
path: root/apps/web/app/reader/_components/reader-layout-shell.tsx
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-09 23:48:27 -0800
committerFuwn <[email protected]>2026-02-09 23:48:27 -0800
commitd0d49d9b759f841c0a05b2410efbd26957a813dc (patch)
tree6c72bd6a27e13b6cadb2d1797afedc172ffc32e7 /apps/web/app/reader/_components/reader-layout-shell.tsx
parentfix: P0 correctness and security fixes (diff)
downloadasa.news-d0d49d9b759f841c0a05b2410efbd26957a813dc.tar.xz
asa.news-d0d49d9b759f841c0a05b2410efbd26957a813dc.zip
fix: P0 correctness/security fixes and P1 lint error resolution
P0: add missing 'developer' case to check_custom_feed_limit trigger, scope user_entry_states join to authenticated user in API v1 entries, replace in-memory rate limiting with Supabase-backed check_rate_limit RPC. P1: fix all 9 ESLint errors — useSyncExternalStore for useIsMobile, restructure WebhookSection to avoid set-state-in-effect, move ref mutations into useEffect, replace <a> with <Link> on shared page, ignore generated public/sw.js in eslint config.
Diffstat (limited to 'apps/web/app/reader/_components/reader-layout-shell.tsx')
-rw-r--r--apps/web/app/reader/_components/reader-layout-shell.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/web/app/reader/_components/reader-layout-shell.tsx b/apps/web/app/reader/_components/reader-layout-shell.tsx
index fe158b5..391e6a4 100644
--- a/apps/web/app/reader/_components/reader-layout-shell.tsx
+++ b/apps/web/app/reader/_components/reader-layout-shell.tsx
@@ -162,9 +162,15 @@ export function ReaderLayoutShell({
const sidebarGroupRef = useGroupRef()
const sidebarMaxWidthRef = useRef(sidebarMaxWidth)
- sidebarMaxWidthRef.current = sidebarMaxWidth
const sidebarOnLayoutChangedRef = useRef(sidebarLayout.onLayoutChanged)
- sidebarOnLayoutChangedRef.current = sidebarLayout.onLayoutChanged
+
+ useEffect(() => {
+ sidebarMaxWidthRef.current = sidebarMaxWidth
+ }, [sidebarMaxWidth])
+
+ useEffect(() => {
+ sidebarOnLayoutChangedRef.current = sidebarLayout.onLayoutChanged
+ }, [sidebarLayout.onLayoutChanged])
useEffect(() => {
useUserInterfaceStore.getState().setResetSidebarLayout(() => {