File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
frontend/src/app/manage-templates Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11import { NHSNotifyButton } from '@atoms/NHSNotifyButton/NHSNotifyButton' ;
22import content from '@content/content' ;
33import { ManageTemplates } from '@molecules/ManageTemplates/ManageTemplates' ;
4- import { Template } from 'nhs-notify-web-template-management-utils' ;
54import { getTemplates } from '@utils/form-actions' ;
65
7- // Note: this page is forced to be server-side rendered
6+ // Note: force this page to be dynamically rendered
87// This is because Next defaults this page as a static rendered page
9- // which causes a build failure due to getTemplates attempting to get cookies
8+ // which causes a build failure due to getTemplates attempting to get a server-side session via cookies and failing
9+ // The other pages which do similar thing expect a templateId parameter
10+ // Which informs next it needs to be dynamically rendered
1011export const dynamic = 'force-dynamic' ;
1112
1213const manageTemplatesContent = content . pages . manageTemplates ;
1314
1415export default async function ManageTemplatesPage ( ) {
15- const availableTemplateList : Template [ ] | [ ] = await getTemplates ( ) ;
16+ const availableTemplateList = await getTemplates ( ) ;
1617
1718 return (
1819 < div className = 'nhsuk-grid-row' data-testid = 'page-content-wrapper' >
You can’t perform that action at this time.
0 commit comments