uselayouteffect for window controls overlay callback

This commit is contained in:
Evan Simkowitz 2024-08-19 14:28:01 -07:00
parent a52e5c6c9b
commit fd375b95d8
No known key found for this signature in database

View File

@ -336,7 +336,7 @@ function AppBackground() {
}), }),
[bgRef, style] [bgRef, style]
); );
React.useEffect(getAvgColor, [getAvgColor]); React.useLayoutEffect(getAvgColor, [getAvgColor]);
useResizeObserver(bgRef, getAvgColor); useResizeObserver(bgRef, getAvgColor);
return <div ref={bgRef} className="app-background" style={style} />; return <div ref={bgRef} className="app-background" style={style} />;