import { VFC } from 'react'; import { useNavigate } from 'react-router-dom'; import { Box } from '@mui/material'; import { Dialogue } from 'component/common/Dialogue/Dialogue'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; interface IErrorProps { error: Error; } export const Error: VFC = ({ error }) => { const navigate = useNavigate(); return ( { navigate('/'); window?.location?.reload(); }} secondaryButtonText="Reload this page" onClose={() => { window?.location?.reload(); }} maxWidth="xl" > {error.message} {error.stack} } /> ); };