12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import React from 'react';
  2. import { HeartTwoTone, SmileTwoTone } from '@ant-design/icons';
  3. import { Card, Typography, Alert } from 'antd';
  4. import { PageHeaderWrapper } from '@ant-design/pro-layout';
  5. import { useIntl } from 'umi';
  6. const Admin = () => {
  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
  30. level={2}
  31. style={{
  32. textAlign: 'center',
  33. }}
  34. >
  35. <SmileTwoTone /> Ant Design Pro <HeartTwoTone twoToneColor="#eb2f96" /> You
  36. </Typography.Title>
  37. </Card>
  38. <p
  39. style={{
  40. textAlign: 'center',
  41. marginTop: 24,
  42. }}
  43. >
  44. Want to add more pages? Please refer to{' '}
  45. <a href="https://pro.ant.design/docs/block-cn" target="_blank" rel="noopener noreferrer">
  46. use block
  47. </a>
  48. </p>
  49. </PageHeaderWrapper>
  50. );
  51. };
  52. export default Admin;