File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
frontend/src/components/molecules/TemplateSubmitted Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Link from 'next/link';
44import { NHSNotifyMain } from '@atoms/NHSNotifyMain/NHSNotifyMain' ;
55import content from '@content/content' ;
66import { withEmbeddedLink } from '@utils/markdownit' ;
7+ import React from 'react' ;
78
89type 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' />
You can’t perform that action at this time.
0 commit comments