fix: collapsed when window width less than 765

This commit is contained in:
fantasticit 2022-03-30 13:57:29 +08:00
parent d84603c54f
commit 733282d84b
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ export const useDragableWidth = () => {
useEffect(() => {
if (!windowSize.width) return;
toggleCollapsed(windowSize.width <= 765);
if (windowSize.width <= 765) {
toggleCollapsed(true);
}
}, [windowSize.width]);
return {