chore: Add error boundary around document notices
This commit is contained in:
@@ -4,6 +4,7 @@ import * as React from "react";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import Document from "~/models/Document";
|
||||
import ErrorBoundary from "~/components/ErrorBoundary";
|
||||
import Notice from "~/components/Notice";
|
||||
import Time from "~/components/Time";
|
||||
|
||||
@@ -47,7 +48,7 @@ export default function Notices({ document, readOnly }: Props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<ErrorBoundary>
|
||||
{document.isTemplate && !readOnly && (
|
||||
<Notice
|
||||
icon={<ShapesIcon />}
|
||||
@@ -82,7 +83,7 @@ export default function Notices({ document, readOnly }: Props) {
|
||||
<Time dateTime={document.deletedAt} addSuffix />
|
||||
</Notice>
|
||||
)}
|
||||
</>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user