Skip to content

Commit

Permalink
fix: correct title tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Leksat committed Sep 26, 2023
1 parent 90fe39b commit fe92b5d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions apps/website/src/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ type NotFoundPageQuery = {
};
};

export function Head() {
return <meta title="Page not found" />;
}

export default function Index({ data }: PageProps<NotFoundPageQuery>) {
return (
<LanguageNegotiator defaultLanguage={'en'}>
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/pages/__preview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import PagePreview from '../../preview/page';

export function Head() {
return <meta title="Page preview" />;
return <title>Page preview</title>;
}

export default function PagePreviewTemplate() {
Expand Down
3 changes: 2 additions & 1 deletion apps/website/src/pages/content-hub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { ContentHub } from '@custom/ui/routes/ContentHub';
import React from 'react';

export function Head() {
return <meta title="Page not found" />;
// TODO: Add title once content hub is language aware.
return null;
}

export default function ContentHubPage() {
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/templates/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type PageTemplateQuery = {
export function Head({ data }: HeadProps<PageTemplateQuery>) {
return (
<>
<meta title={data.page.title} />
<title>{data.page.title}</title>
{data.page.metaTags?.map((metaTag, index) => {
if (metaTag?.tag === 'meta') {
return (
Expand Down

0 comments on commit fe92b5d

Please sign in to comment.