Skip to content

Commit

Permalink
Merge pull request #10395 from bbc/WSTEAMA-168-duration-promos
Browse files Browse the repository at this point in the history
WSTEAMA 168 Show duration on media promos
  • Loading branch information
rebeccamcginn authored Nov 9, 2022
2 parents fbea868 + 5a52f67 commit fe9c593
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions data/mundo/topics/c1en6xwmpkvt.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
{
"title": "El video de prueba",
"type": "video",
"duration": "PT5M",
"firstPublished": "2022-05-12T10:41:21.000Z",
"link": "https://www.bbc.com/mundo/23048701",
"imageUrl": "https://ichef.test.bbci.co.uk/news/{width}/cpsdevpb/FA0D/test/_63931046_p00wjk8v.jpg",
Expand All @@ -76,6 +77,7 @@
{
"title": "Anuncio del acuerdo",
"type": "video",
"duration": "PT5M",
"firstPublished": "2022-05-12T10:41:14.000Z",
"link": "https://www.bbc.com/mundo/noticias-internacional-23452772",
"imageUrl": "https://ichef.test.bbci.co.uk/news/{width}/cpsdevpb/ABED/test/_63931044_p0182w7g.jpg",
Expand All @@ -86,6 +88,7 @@
{
"title": "Hippopotamos tomando el sol",
"type": "video",
"duration": "PT5M",
"firstPublished": "2022-05-12T10:41:02.000Z",
"link": "https://www.bbc.com/mundo/noticias-america-latina-23049956",
"imageUrl": "https://ichef.test.bbci.co.uk/news/{width}/cpsdevpb/1482D/test/_63931048_p012z4jy.jpg",
Expand Down
6 changes: 3 additions & 3 deletions src/app/pages/TopicPage/Curation/CurationPromo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const CurationPromo = ({
lazy,
link,
type,
mediaDuration,
duration: mediaDuration,
headingLevel,
}) => {
return (
Expand All @@ -36,14 +36,14 @@ CurationPromo.propTypes = {
lazy: bool,
link: string.isRequired,
type: string,
mediaDuration: number,
duration: number,
headingLevel: number,
};

CurationPromo.defaultProps = {
lazy: false,
type: null,
mediaDuration: null,
duration: null,
headingLevel: 2,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const WithMediaIndicator = ({ service, variant }) => {
<Promo
{...fixture.data.summaries[0]}
type={MEDIA_TYPES.VIDEO}
mediaDuration={123}
duration={123}
/>
</Wrapper>
</ServiceContextProvider>
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/TopicPage/HierarchicalGrid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Summary = {
id: string;
link?: string;
firstPublished?: string | number;
mediaDuration?: string | number;
duration?: string | number;
imageUrl?: string;
imageAlt?: string;
mediaType?: 'audio' | 'video' | 'photogallery';
Expand Down Expand Up @@ -60,7 +60,7 @@ const HiearchicalGrid = ({ summaries }: Summaries) => {
loading="lazy"
>
<Promo.MediaIcon type={promo.type}>
{promo.mediaDuration}
{promo.duration}
</Promo.MediaIcon>
</Promo.Image>
<Promo.Heading
Expand Down

0 comments on commit fe9c593

Please sign in to comment.