frigate/web/src
Claude 067fdb50e1
fix: replace useResizeObserver with useLayoutEffect for reliable container width
useResizeObserver reads ref.current during render (before commit), so on
first render ref.current is null, no observation starts, and containerWidth
stays 0 if no subsequent re-render happens (e.g. page refresh with cached
SWR data). useLayoutEffect runs after refs are committed, so ref.current
is always the real DOM element.

This fixes both the right-column overflow (no window.innerWidth fallback
needed — width is always the actual container width) and the black screen
on refresh (containerWidth is reliable before the first paint).

https://claude.ai/code/session_01H1sqbcFmtwwsdNTJcJHJWd
2026-03-15 12:03:54 +00:00
..
api Replace react-tracked and react-use-websocket with useSyncExternalStore (#22386) 2026-03-11 09:02:51 -05:00
components Merge branch 'blakeblackshear:dev' into dev 2026-03-15 13:55:05 +11:00
context Update frontend to React 19 (#22275) 2026-03-05 07:42:38 -07:00
hooks Replace react-tracked and react-use-websocket with useSyncExternalStore (#22386) 2026-03-11 09:02:51 -05:00
lib Support using GenAI for embeddings / semantic search (#22323) 2026-03-08 10:55:00 -05:00
pages Support using GenAI for embeddings / semantic search (#22323) 2026-03-08 10:55:00 -05:00
types Merge branch 'blakeblackshear:dev' into dev 2026-03-15 13:55:05 +11:00
utils Merge branch 'blakeblackshear:dev' into dev 2026-03-15 13:55:05 +11:00
views fix: replace useResizeObserver with useLayoutEffect for reliable container width 2026-03-15 12:03:54 +00:00
App.tsx Frontend fixes (#22309) 2026-03-07 06:43:00 -07:00
env.ts Fix linter and fix lint issues (#10141) 2024-02-28 16:23:56 -06:00
index.css Improve live streaming (#16447) 2025-02-10 09:42:35 -07:00
login.tsx Fix auth when serving Frigate at a subpath (#12815) 2024-08-09 07:26:26 -06:00
main.tsx feat: add i18n (translation/localization) (#16877) 2025-03-16 10:36:20 -05:00
vite-env.d.ts switch to vite 2022-03-11 07:49:06 -06:00