Skip to content

Commit

Permalink
refactor(theme): fix duplicate page metadata usage (#7777)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber authored Jul 14, 2022
1 parent c48f338 commit 9788944
Showing 1 changed file with 22 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,28 @@ function DocCategoryGeneratedIndexPageContent({
}: Props): JSX.Element {
const category = useCurrentSidebarCategory();
return (
<>
<PageMetadata
title={categoryGeneratedIndex.title}
description={categoryGeneratedIndex.description}
keywords={categoryGeneratedIndex.keywords}
// TODO `require` this?
image={useBaseUrl(categoryGeneratedIndex.image)}
/>
<div className={styles.generatedIndexPage}>
<DocVersionBanner />
<DocBreadcrumbs />
<DocVersionBadge />
<header>
<Heading as="h1" className={styles.title}>
{categoryGeneratedIndex.title}
</Heading>
{categoryGeneratedIndex.description && (
<p>{categoryGeneratedIndex.description}</p>
)}
</header>
<article className="margin-top--lg">
<DocCardList items={category.items} className={styles.list} />
</article>
<footer className="margin-top--lg">
<DocPaginator
previous={categoryGeneratedIndex.navigation.previous}
next={categoryGeneratedIndex.navigation.next}
/>
</footer>
</div>
</>
<div className={styles.generatedIndexPage}>
<DocVersionBanner />
<DocBreadcrumbs />
<DocVersionBadge />
<header>
<Heading as="h1" className={styles.title}>
{categoryGeneratedIndex.title}
</Heading>
{categoryGeneratedIndex.description && (
<p>{categoryGeneratedIndex.description}</p>
)}
</header>
<article className="margin-top--lg">
<DocCardList items={category.items} className={styles.list} />
</article>
<footer className="margin-top--lg">
<DocPaginator
previous={categoryGeneratedIndex.navigation.previous}
next={categoryGeneratedIndex.navigation.next}
/>
</footer>
</div>
);
}

Expand Down

0 comments on commit 9788944

Please sign in to comment.