Skip to content

Commit 50d7c33

Browse files
authored
Merge branch 'main' into dina/remove-AdYouLike-code
2 parents 0b9d9ce + d7dbad8 commit 50d7c33

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

dotcom-rendering/src/components/ListenToArticle.importable.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ export const ListenToArticle = ({ articleId }: Props) => {
3838
getListenToArticleClient().isPlaying(articleId),
3939
getListenToArticleClient().getAudioDurationSeconds(articleId),
4040
])
41-
.then(() => {
42-
// TODO pending design implementation and AB test set up.
43-
// .then(({ isAvailable, isPlaying, audioDurationSeconds }) => {
44-
// setAudioDuration(
45-
// audioDurationSeconds ? audioDurationSeconds : undefined,
46-
// );
47-
// setShowButton(isAvailable && !isPlaying);
48-
setAudioDurationSeconds(undefined);
49-
setShowButton(false);
41+
.then(([isAvailable, isPlaying, durationSeconds]) => {
42+
setAudioDurationSeconds(
43+
typeof durationSeconds === 'number' &&
44+
durationSeconds > 0
45+
? durationSeconds
46+
: undefined,
47+
);
48+
setShowButton(isAvailable && !isPlaying);
5049
})
5150
.catch((error) => {
5251
console.error(

dotcom-rendering/src/layouts/ImmersiveLayout.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,9 @@ export const ImmersiveLayout = (props: WebProps | AppProps) => {
601601
article.config.shortUrlId
602602
}
603603
/>
604+
{!!article.affiliateLinksDisclaimer && (
605+
<AffiliateDisclaimer />
606+
)}
604607
</Hide>
605608
</>
606609
) : (

dotcom-rendering/src/layouts/ShowcaseLayout.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ export const ShowcaseLayout = (props: WebProps | AppsProps) => {
486486
article.config.shortUrlId
487487
}
488488
/>
489+
{!!article.affiliateLinksDisclaimer && (
490+
<AffiliateDisclaimer />
491+
)}
489492
</Hide>
490493
</>
491494
) : (

dotcom-rendering/src/layouts/StandardLayout.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,9 @@ export const StandardLayout = (props: WebProps | AppProps) => {
645645
}
646646
/>
647647
</div>
648+
{!!article.affiliateLinksDisclaimer && (
649+
<AffiliateDisclaimer />
650+
)}
648651
</Hide>
649652
</>
650653
) : (

0 commit comments

Comments
 (0)