Files
video-gen/video-gen-admin/node_modules/antd/es/_util/getReactMajorVersionCanDelMe.js
T
2026-05-25 17:08:18 +08:00

8 lines
338 B
JavaScript

// ZombieJ: This is only warn for React 17 not support.
// But Jest mock React 17 will cause many issues in testing,
// Can be safe to remove in next major version.
import { version } from 'react';
export default function getReactMajorVersion() {
const majorVersion = Number.parseInt(version.split('.')[0], 10);
return majorVersion;
}