fix: right pannel

This commit is contained in:
yehuozhili 2020-10-09 13:38:01 +08:00
parent 6c013a2318
commit 34f5b3239b

View File

@ -188,17 +188,19 @@ const Container = (props: {
dispatch(ActionCreators.undo()); dispatch(ActionCreators.undo());
}; };
}, [dispatch]); }, [dispatch]);
useEffect(() => { useEffect(() => {
if (window.innerWidth < 1024) { if (window.innerWidth < 1024) {
props.history.push('/mobileTip'); props.history.push('/mobileTip');
} //待修改 } //待修改
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, []); }, []);
useEffect(() => { useEffect(() => {
if (pstate.curPoint && pstate.curPoint.status === 'inToCanvas' && rightColla) { if (pstate.curPoint && pstate.curPoint.status === 'inToCanvas') {
changeRightColla(false); setRightColla(false);
} }
}, [changeRightColla, pstate.curPoint, rightColla]); }, [pstate.curPoint]);
const allType = useMemo(() => { const allType = useMemo(() => {
let arr: string[] = []; let arr: string[] = [];