Skip to content

Commit

Permalink
Add SEOComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
osamasayed committed Sep 15, 2024
1 parent 620f3d4 commit e2ef923
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/pages/media/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,23 +376,27 @@ const MediaMaker: NextPage<MediaMaker> = ({
const { width, height } = orientationToDimensions(orientation);
const PATH = getQuranMediaMakerNavigationUrl();

const SEOComponent = (
<NextSeoWrapper
title={t('media:maker-title')}
description={t('media:maker-meta-desc')}
url={getCanonicalUrl(lang, PATH)}
languageAlternates={getLanguageAlternates(PATH)}
image={getMediaGeneratorOgImageUrl({
locale: lang,
})}
imageWidth={1200}
imageHeight={630}
/>
);

if (!isReady) {
return <></>;
return <>{SEOComponent}</>;
}

return (
<>
<NextSeoWrapper
title={t('media:maker-title')}
description={t('media:maker-meta-desc')}
url={getCanonicalUrl(lang, PATH)}
languageAlternates={getLanguageAlternates(PATH)}
image={getMediaGeneratorOgImageUrl({
locale: lang,
})}
imageWidth={1200}
imageHeight={630}
/>
{SEOComponent}
<div className={styles.pageContainer}>
<div className={classNames(styles.playerWrapper, layoutStyles.flowItem)}>
<>
Expand Down

0 comments on commit e2ef923

Please sign in to comment.