mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
uselayouteffect for window controls overlay callback
This commit is contained in:
parent
a52e5c6c9b
commit
fd375b95d8
@ -336,7 +336,7 @@ function AppBackground() {
|
||||
}),
|
||||
[bgRef, style]
|
||||
);
|
||||
React.useEffect(getAvgColor, [getAvgColor]);
|
||||
React.useLayoutEffect(getAvgColor, [getAvgColor]);
|
||||
useResizeObserver(bgRef, getAvgColor);
|
||||
|
||||
return <div ref={bgRef} className="app-background" style={style} />;
|
||||
|
Loading…
Reference in New Issue
Block a user