From f6e6187ff5dae5a229162b6e907c2abe992796fb Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 1 Feb 2024 18:03:59 -0500 Subject: [PATCH] chore: Add error boundary around document notices --- app/scenes/Document/components/Notices.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/scenes/Document/components/Notices.tsx b/app/scenes/Document/components/Notices.tsx index 3eb696a99..039ee1d18 100644 --- a/app/scenes/Document/components/Notices.tsx +++ b/app/scenes/Document/components/Notices.tsx @@ -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 ( - <> + {document.isTemplate && !readOnly && ( } @@ -82,7 +83,7 @@ export default function Notices({ document, readOnly }: Props) { )} - + ); }