Fix notification list item detail pathname link

This commit is contained in:
Marliana Lara 2020-11-04 15:31:00 -05:00
parent bf6064db21
commit 52c8033a08
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
2 changed files with 3 additions and 3 deletions

View File

@ -219,7 +219,7 @@ function NotificationList({
<NotificationListItem
key={notification.id}
notification={notification}
detailUrl={`/notifications/${notification.id}`}
detailUrl={`/notification_templates/${notification.id}/details`}
canToggleNotifications={
canToggleNotifications &&
!loadingToggleIds.includes(notification.id)

View File

@ -18,6 +18,7 @@ import ContentError from '../../components/ContentError';
import { NotificationTemplatesAPI } from '../../api';
import NotificationTemplateDetail from './NotificationTemplateDetail';
import NotificationTemplateEdit from './NotificationTemplateEdit';
import ContentLoading from '../../components/ContentLoading';
function NotificationTemplate({ setBreadcrumb, i18n }) {
const { id: templateId } = useParams();
@ -94,20 +95,19 @@ function NotificationTemplate({ setBreadcrumb, i18n }) {
to="/notification_templates/:id/details"
exact
/>
{isLoading && <ContentLoading />}
{template && (
<>
<Route path="/notification_templates/:id/edit">
<NotificationTemplateEdit
template={template}
defaultMessages={defaultMessages}
isLoading={isLoading}
/>
</Route>
<Route path="/notification_templates/:id/details">
<NotificationTemplateDetail
template={template}
defaultMessages={defaultMessages}
isLoading={isLoading}
/>
</Route>
</>