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

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

export default InternalServerErrorPage;
