import React from 'react'; import { App, Button, Space } from 'antd'; // Sub page const MyPage = () => { const { message, modal, notification } = App.useApp(); const showMessage = () => { message.success('Success!'); }; const showModal = () => { modal.warning({ title: 'This is a warning message', content: 'some messages...some messages...', }); }; const showNotification = () => { notification.info({ message: 'Notification topLeft', description: 'Hello, Ant Design!!', placement: 'topLeft', }); }; return ( ); }; // Entry component export default () => ( );