Display global error if server is unreachable

This commit is contained in:
Gabe Kangas
2022-05-27 22:27:20 -07:00
parent ce9d403269
commit aae63e4e2c
5 changed files with 88 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
import { Modal } from 'antd';
interface Props {
title: string;
message: string;
}
export default function FatalErrorStateModal(props: Props) {
const { title, message } = props;
return (
<Modal
title={title}
visible
footer={null}
closable={false}
keyboard={false}
width={900}
centered
className="modal"
>
<style global jsx>{`
.modal .ant-modal-content,
.modal .ant-modal-header {
background-color: var(--warning-color);
}
`}</style>
<p>{message}</p>
</Modal>
);
}