File tree Expand file tree Collapse file tree
frontend/src/app/request-a-proof/[templateId] Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { 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' ;
36import pageContent from '@content/content' ;
47import { NHSNotifyContainer } from '@layouts/container/container' ;
58import { 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-
2623const 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 >
You can’t perform that action at this time.
0 commit comments