Skip to content

Commit 36f8fdc

Browse files
committed
fix eslint error
1 parent d368ed1 commit 36f8fdc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/pages/home/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ function Home({ sidebarVisible, setSidebarVisible }) {
370370
handleResize();
371371
window.addEventListener('resize', handleResize);
372372
return () => window.removeEventListener('resize', handleResize);
373-
}, [cards, isMobile, calculateDefaultLayouts]);
373+
}, [cards, isMobile, calculateDefaultLayouts, activeGroup]);
374374
// 添加一个函数,合并现有布局和新计算的布局
375375
const mergeLayouts = useCallback((defaultLayouts, currentLayouts, cardIds) => {
376376
const result = {};
@@ -494,7 +494,7 @@ function Home({ sidebarVisible, setSidebarVisible }) {
494494
};
495495

496496
loadConfig();
497-
}, [isMobile, calculateDefaultLayouts, mergeLayouts, isLayoutValid]); // 恢复 isMobile 依赖因为移动设备和桌面设备的布局不同
497+
}, [isMobile, calculateDefaultLayouts, mergeLayouts, isLayoutValid, activeGroup]); // 恢复 isMobile 依赖,因为移动设备和桌面设备的布局不同
498498

499499

500500
// const handleRefresh = () => {

0 commit comments

Comments
 (0)