ensure notification template re-loads after saving

This commit is contained in:
Keith Grant 2020-08-31 09:38:28 -07:00
parent e830da97f3
commit 4a616d9f81

View File

@ -45,9 +45,9 @@ function NotificationTemplate({ setBreadcrumb, i18n }) {
useEffect(() => {
fetchTemplate();
}, [fetchTemplate]);
}, [fetchTemplate, location.pathname]);
if (error) {
if (!isLoading && error) {
return (
<PageSection>
<Card>
@ -66,7 +66,7 @@ function NotificationTemplate({ setBreadcrumb, i18n }) {
);
}
const showCardHeader = !isLoading && !location.pathname.endsWith('edit');
const showCardHeader = !location.pathname.endsWith('edit');
const tabs = [
{
name: (