From 4a616d9f81353e3417110d03800e07279dca226c Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Mon, 31 Aug 2020 09:38:28 -0700 Subject: [PATCH] ensure notification template re-loads after saving --- .../screens/NotificationTemplate/NotificationTemplate.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplate.jsx b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplate.jsx index cc32c9eb64..005dd0e40b 100644 --- a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplate.jsx +++ b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplate.jsx @@ -45,9 +45,9 @@ function NotificationTemplate({ setBreadcrumb, i18n }) { useEffect(() => { fetchTemplate(); - }, [fetchTemplate]); + }, [fetchTemplate, location.pathname]); - if (error) { + if (!isLoading && error) { return ( @@ -66,7 +66,7 @@ function NotificationTemplate({ setBreadcrumb, i18n }) { ); } - const showCardHeader = !isLoading && !location.pathname.endsWith('edit'); + const showCardHeader = !location.pathname.endsWith('edit'); const tabs = [ { name: (