mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-23 19:06:32 +02:00
various performance refactors
This commit is contained in:
@@ -175,13 +175,18 @@ export const MainContent = ({ shell }: { shell?: boolean }) => {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isResizing && !isResizingRight) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.addEventListener('mousemove', resize);
|
||||
window.addEventListener('mouseup', stopResizing);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('mousemove', resize);
|
||||
window.removeEventListener('mouseup', stopResizing);
|
||||
};
|
||||
}, [resize, stopResizing]);
|
||||
}, [isResizing, isResizingRight, resize, stopResizing]);
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
|
||||
Reference in New Issue
Block a user