Skip to content

Commit 3338d0c

Browse files
committed
Simplify syntax of data-fronts-test-uuid attribute assignment
1 parent 22f48a8 commit 3338d0c

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

dotcom-rendering/src/components/Card/components/CardLink.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ const InternalLink = ({
5757
shouldRaiseZIndexForAbTest ? abTestZIndexStyles : zIndexStyles,
5858
]}
5959
data-link-name={dataLinkName}
60-
{...(headlineTestUuid != undefined && {
61-
'data-fronts-test-uuid': headlineTestUuid,
62-
})}
60+
data-fronts-test-uuid={headlineTestUuid}
6361
aria-label={headlineText}
6462
/>
6563
);
@@ -86,9 +84,7 @@ const ExternalLink = ({
8684
shouldRaiseZIndexForAbTest ? abTestZIndexStyles : zIndexStyles,
8785
]}
8886
data-link-name={dataLinkName}
89-
{...(headlineTestUuid != undefined && {
90-
'data-fronts-test-uuid': headlineTestUuid,
91-
})}
87+
data-fronts-test-uuid={headlineTestUuid}
9288
aria-label={headlineText + ' (opens in new tab)'}
9389
target="_blank"
9490
rel="noreferrer"

dotcom-rendering/src/components/SupportingContent.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ export const SupportingContent = ({
186186
: verticalSublinkStyles,
187187
]}
188188
data-link-name={`sublinks | ${index + 1}`}
189-
{...(subLink.headlineTestUuid != undefined && {
190-
'data-fronts-test-uuid': subLink.headlineTestUuid,
191-
})}
189+
data-fronts-test-uuid={subLink.headlineTestUuid}
192190
>
193191
<FormatBoundary format={subLinkFormat}>
194192
<ContainerOverrides

0 commit comments

Comments
 (0)