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

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

export default UnAccessPage;
