Merge pull request #8540 from marshmalien/8461-notification-detail-link

Fix notification list to notification list item detail link

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-11-05 22:23:47 +00:00 committed by GitHub
commit 0567a2a3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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>
</>