Skip to content

Commit e9191be

Browse files
committed
CCM-8864 Extract copy into content file
1 parent 485a186 commit e9191be

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

frontend/src/components/molecules/PreviewTemplateDetails/PreviewTemplateDetails.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ import styles from './PreviewTemplateDetails.module.scss';
1313
import { PreviewTemplateDetailsProps } from './preview-template-details.types';
1414
import { JSX } from 'react';
1515
import { Filename } from '@atoms/Filename/Filename';
16+
import content from '@content/content';
1617

1718
export function PreviewTemplateDetails({
1819
template,
1920
templateTypeText,
2021
additionalMetaFields,
2122
contentPreview,
2223
}: Readonly<PreviewTemplateDetailsProps>): JSX.Element {
24+
const { rowHeadings } = content.components.previewTemplateDetails;
25+
2326
return (
2427
<>
2528
<h1
@@ -39,15 +42,15 @@ export function PreviewTemplateDetails({
3942
)}
4043
>
4144
<SummaryList.Row>
42-
<SummaryList.Key>Template ID</SummaryList.Key>
45+
<SummaryList.Key>{rowHeadings.templateId}</SummaryList.Key>
4346
<SummaryList.Value>{template.id}</SummaryList.Value>
4447
</SummaryList.Row>
4548
<SummaryList.Row>
46-
<SummaryList.Key>Type</SummaryList.Key>
49+
<SummaryList.Key>{rowHeadings.templateType}</SummaryList.Key>
4750
<SummaryList.Value>{templateTypeText}</SummaryList.Value>
4851
</SummaryList.Row>
4952
<SummaryList.Row>
50-
<SummaryList.Key>Status</SummaryList.Key>
53+
<SummaryList.Key>{rowHeadings.templateStatus}</SummaryList.Key>
5154
<SummaryList.Value>
5255
<Tag
5356
color={

frontend/src/content/content.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ const previewSMSTemplate = {
283283
backLinkText: backToAllTemplates,
284284
};
285285

286+
const previewTemplateDetails = {
287+
rowHeadings: {
288+
templateId: 'Template ID',
289+
templateType: 'Type',
290+
templateStatus: 'Status',
291+
},
292+
};
293+
286294
const error404 = {
287295
pageHeading: 'Sorry, we could not find that page',
288296
p1: 'You may have typed or pasted a web address incorrectly. ',
@@ -557,6 +565,7 @@ const content = {
557565
previewLetterTemplate,
558566
previewNHSAppTemplate,
559567
previewSMSTemplate,
568+
previewTemplateDetails,
560569
submitTemplate,
561570
templateFormEmail,
562571
templateFormLetter,

0 commit comments

Comments
 (0)