import React from 'react';
import { Button } from 'antd';
/**
 * 出错后现时的组件
 * @param error
 * @param resetErrorBoundary
 * @constructor
 */
export const ErrorFallback = ({ error, resetErrorBoundary }) => {
  return (
    <div role='alert'>
      <p>出错啦</p>
      <pre>{error.message}</pre>
      <Button type='link' onClick={resetErrorBoundary}>
        Try again
      </Button>
    </div>
  );
};
