mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
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 |
||
|---|---|---|
| .. | ||
| api | ||
| components | ||
| context | ||
| hooks | ||
| lib | ||
| pages | ||
| types | ||
| utils | ||
| views | ||
| App.tsx | ||
| env.ts | ||
| index.css | ||
| login.tsx | ||
| main.tsx | ||
| vite-env.d.ts | ||