Skip to content

Commit

Permalink
fix: header block video microdata (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
qradle-yndx authored Feb 12, 2025
1 parent 7853757 commit 779cef3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/blocks/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
const backgroundThemed = background && getThemedValue(background, theme);
const imageThemed = image && getThemedValue(image, theme);
const videoThemed = video && getThemedValue(video, theme);
const mediaWithMicrodata = mergeVideoMicrodata(videoThemed, {
name: title,
description,
});
const mediaWithMicrodata = mergeVideoMicrodata(
{video: videoThemed, image: imageThemed},
{
name: title,
description,
},
);
const fullWidth = backgroundThemed?.fullWidth || backgroundThemed?.fullWidthMedia;
const titleId = useUniqId();

Expand Down Expand Up @@ -190,7 +193,6 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
videoClassName={b('video')}
imageClassName={b('image')}
{...mediaWithMicrodata}
image={imageThemed}
/>
)}
</Col>
Expand Down

0 comments on commit 779cef3

Please sign in to comment.