import { memo, ReactElement } from 'react';
import styles from './index.less';
import { Spin } from 'antd';
const Loading = ({
  children,
  loading,
}: {
  children: ReactElement;
  loading: boolean;
}) => {
  return (
    <>{loading ? <div className={styles.container}><Spin/></div> : <>{children}</>}</>
  );
};
export default memo(Loading);
