Skip to content

Commit 7200475

Browse files
committed
CCM-15018: remove channelSlug
1 parent 554b035 commit 7200475

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

  • frontend/src/app/request-a-proof/[templateId]

frontend/src/app/request-a-proof/[templateId]/page.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { Metadata } from 'next';
2-
import { TemplatePageProps } from 'nhs-notify-web-template-management-utils';
2+
import {
3+
previewTemplatePages,
4+
TemplatePageProps,
5+
} from 'nhs-notify-web-template-management-utils';
36
import pageContent from '@content/content';
47
import { NHSNotifyContainer } from '@layouts/container/container';
58
import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain';
@@ -17,12 +20,6 @@ export async function generateMetadata(): Promise<Metadata> {
1720
};
1821
}
1922

20-
const channelSlug = {
21-
NHS_APP: 'nhs-app',
22-
SMS: 'text-message',
23-
EMAIL: 'email',
24-
};
25-
2623
const RequestDigitalProofPage = async (props: TemplatePageProps) => {
2724
const { templateId } = await props.params;
2825
const template = await getTemplate(templateId);
@@ -34,7 +31,7 @@ const RequestDigitalProofPage = async (props: TemplatePageProps) => {
3431
return (
3532
<NHSNotifyContainer>
3633
<NHSNotifyBackLink
37-
href={`/preview-${channelSlug[template.templateType]}-template/${templateId}`}
34+
href={`/${previewTemplatePages(template.templateType)}/${templateId}`}
3835
>
3936
{backLink.text}
4037
</NHSNotifyBackLink>

0 commit comments

Comments
 (0)