import { ROUTER_HOME } from '@/constants/routes';
import { history, useIntl } from '@umijs/max';
import { Button, Result } from 'antd';
import React from 'react';

const NotFoundPage: React.FC = () => {
  const intl = useIntl();
  return (
    <Result
      status="404"
      title="404"
      subTitle={intl.formatMessage({ id: 'common.notfound' })}
      extra={
        <Button onClick={() => history.push(ROUTER_HOME)} type="primary">
          {intl.formatMessage({ id: 'common.back' })}
        </Button>
      }
    />
  );
};

export default NotFoundPage;
