From 34f5b3239b59f4a3f28d1803264563058b7cb90e Mon Sep 17 00:00:00 2001 From: yehuozhili Date: Fri, 9 Oct 2020 13:38:01 +0800 Subject: [PATCH] fix: right pannel --- src/pages/editor/Container.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/editor/Container.tsx b/src/pages/editor/Container.tsx index b2442cb..e56b035 100644 --- a/src/pages/editor/Container.tsx +++ b/src/pages/editor/Container.tsx @@ -188,17 +188,19 @@ const Container = (props: { dispatch(ActionCreators.undo()); }; }, [dispatch]); + useEffect(() => { if (window.innerWidth < 1024) { props.history.push('/mobileTip'); } //待修改 // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + useEffect(() => { - if (pstate.curPoint && pstate.curPoint.status === 'inToCanvas' && rightColla) { - changeRightColla(false); + if (pstate.curPoint && pstate.curPoint.status === 'inToCanvas') { + setRightColla(false); } - }, [changeRightColla, pstate.curPoint, rightColla]); + }, [pstate.curPoint]); const allType = useMemo(() => { let arr: string[] = [];