import React, { useRef } from 'react'; import ProLayout, { PageContainer } from '@ant-design/pro-layout'; import { Button } from 'antd'; import customMenuDate from './customMenu'; const waitTime = (time: number = 100) => { return new Promise((resolve) => { setTimeout(() => { resolve(true); }, time); }); }; export default () => { const actionRef = useRef<{ reload: () => void; }>(); return ( <> { await waitTime(2000); return customMenuDate; }, }} location={{ pathname: '/welcome/welcome', }} > Hello World ); };