Admin.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { HeartTwoTone, SmileTwoTone } from '@ant-design/icons';
  2. import { PageHeaderWrapper } from '@ant-design/pro-components';
  3. import { Alert, Card, Typography } from 'antd';
  4. import React from 'react';
  5. import { useIntl } from 'umi';
  6. const Admin: React.FC = () => {
  7. const intl = useIntl();
  8. return (
  9. <PageHeaderWrapper
  10. content={intl.formatMessage({
  11. id: 'pages.admin.subPage.title',
  12. defaultMessage: 'This page can only be viewed by admin',
  13. })}
  14. >
  15. <Card>
  16. <Alert
  17. message={intl.formatMessage({
  18. id: 'pages.welcome.alertMessage',
  19. defaultMessage: 'Faster and stronger heavy-duty components have been released.',
  20. })}
  21. type="success"
  22. showIcon
  23. banner
  24. style={{
  25. margin: -12,
  26. marginBottom: 48,
  27. }}
  28. />
  29. <Typography.Title level={2} style={{ textAlign: 'center' }}>
  30. <SmileTwoTone /> Ant Design Pro <HeartTwoTone twoToneColor="#eb2f96" /> You
  31. </Typography.Title>
  32. </Card>
  33. <p style={{ textAlign: 'center', marginTop: 24 }}>
  34. Want to add more pages? Please refer to{' '}
  35. <a href="https://pro.ant.design/docs/block-cn" target="_blank" rel="noopener noreferrer">
  36. use block
  37. </a>
  38. </p>
  39. </PageHeaderWrapper>
  40. );
  41. };
  42. export default Admin;