website refactor
This commit is contained in:
@@ -3,6 +3,15 @@ import { PageDataFetcher } from '@/lib/page/PageDataFetcher';
|
||||
import { HomePageQuery } from '@/lib/page-queries/HomePageQuery';
|
||||
import { notFound, redirect } from 'next/navigation';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { Metadata } from 'next';
|
||||
import { MetadataHelper } from '@/lib/seo/MetadataHelper';
|
||||
import { JsonLd } from '@/ui/JsonLd';
|
||||
|
||||
export const metadata: Metadata = MetadataHelper.generate({
|
||||
title: 'Professional iRacing League Management Platform',
|
||||
description: 'Experience the pinnacle of sim racing organization. GridPilot provides obsessive detail in race management, automated standings, and professional-grade tools for serious iRacing leagues.',
|
||||
path: '/',
|
||||
});
|
||||
|
||||
export default async function Page() {
|
||||
if (await HomePageQuery.shouldRedirectToDashboard()) {
|
||||
@@ -17,6 +26,24 @@ export default async function Page() {
|
||||
if (!data) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const jsonLd = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebSite',
|
||||
name: 'GridPilot',
|
||||
url: 'https://gridpilot.com',
|
||||
description: 'Professional iRacing League Management Platform',
|
||||
potentialAction: {
|
||||
'@type': 'SearchAction',
|
||||
target: 'https://gridpilot.com/search?q={search_term_string}',
|
||||
'query-input': 'required name=search_term_string',
|
||||
},
|
||||
};
|
||||
|
||||
return <HomePageClient viewData={data} />;
|
||||
return (
|
||||
<>
|
||||
<JsonLd data={jsonLd} />
|
||||
<HomePageClient viewData={data} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user