Skip to content

Commit

Permalink
fix(seo): remove canonical author (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpasquet committed May 3, 2024
1 parent 918c20a commit 6f1d697
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/containers/AuthorPageContainer/useAuthorPageContainer.tsx
@@ -1,10 +1,9 @@
import { AuthorPageProps, SocialNetworkName } from '@eleven-labs/design-system';
import { useLink } from 'hoofd';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useLoaderData, useParams } from 'react-router-dom';

import { DEFAULT_LANGUAGE, PATHS } from '@/constants';
import { PATHS } from '@/constants';
import { PostCardListContainer, PostCardListContainerProps } from '@/containers/PostCardListContainer';
import { generatePath } from '@/helpers/routerHelper';
import { useNewsletterCard } from '@/hooks/useNewsletterCard';
Expand All @@ -17,13 +16,6 @@ export const useAuthorPageContainer = (): AuthorPageProps | undefined => {
const authorPageData = useLoaderData() as AuthorPageData;
const newsletterCard = useNewsletterCard();
useTitle(t('pages.author.seo.title', { authorName: authorPageData?.author.name }));
useLink({
rel: 'canonical',
href: generatePath(PATHS.AUTHOR, {
lang: DEFAULT_LANGUAGE,
authorUsername: authorPageData?.author?.username,
}),
});

const getPaginatedLink: PostCardListContainerProps['getPaginatedLink'] = (page: number) => ({
href: generatePath(PATHS.AUTHOR_PAGINATED, { lang: i18n.language, authorUsername, page }),
Expand Down

0 comments on commit 6f1d697

Please sign in to comment.