mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
Merge 127344adfb
into 8abb52fc92
This commit is contained in:
commit
80fe305172
@ -12,10 +12,7 @@ export default function MotionWrapper(props: MotionWrapperProps): React.ReactEle
|
||||
const [, token] = useToken();
|
||||
const { motion } = token;
|
||||
|
||||
const needWrapMotionProviderRef = React.useRef(false);
|
||||
needWrapMotionProviderRef.current = needWrapMotionProviderRef.current || motion === false;
|
||||
|
||||
if (needWrapMotionProviderRef.current) {
|
||||
if (motion) {
|
||||
return <MotionProvider motion={motion}>{children}</MotionProvider>;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user