Skip to content

Commit 1bddc86

Browse files
committed
CCM-10917 Fix missing key
1 parent cef085b commit 1bddc86

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

frontend/src/components/molecules/TemplateSubmitted/TemplateSubmitted.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Link from 'next/link';
44
import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain';
55
import content from '@content/content';
66
import { withEmbeddedLink } from '@utils/markdownit';
7+
import React from 'react';
78

89
type TemplateSubmittedProps = { templateId: string; templateName: string };
910

@@ -54,22 +55,23 @@ export const TemplateSubmitted = ({
5455
<h2 className='nhsuk-u-margin-top-6 nhsuk-u-margin-bottom-6'>
5556
{doNextHeading}
5657
</h2>
57-
{doNextParagraphs.map(({ heading, text }) => {
58+
{doNextParagraphs.map(({ heading, text }, index) => {
5859
return (
59-
<>
60+
<React.Fragment key={`do-next-section-${index}`}>
6061
<h3 className='nhsuk-u-margin-top-6 nhsuk-u-margin-bottom-3'>
6162
{heading}
6263
</h3>
63-
{text.map((content) => {
64+
{text.map((content, i) => {
6465
return (
6566
<p
67+
key={`do-next-${index}-${i}`}
6668
dangerouslySetInnerHTML={{
6769
__html: withEmbeddedLink(content),
6870
}}
6971
/>
7072
);
7173
})}
72-
</>
74+
</React.Fragment>
7375
);
7476
})}
7577
<hr className='nhsuk-section-break--visible' />

0 commit comments

Comments
 (0)