fix website build
This commit is contained in:
22
apps/website/app/404/page.tsx
Normal file
22
apps/website/app/404/page.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function Custom404Page() {
|
||||
return (
|
||||
<main className="min-h-screen flex items-center justify-center bg-deep-graphite text-white px-6">
|
||||
<div className="max-w-md text-center space-y-4">
|
||||
<h1 className="text-3xl font-semibold">404</h1>
|
||||
<p className="text-sm text-gray-400">
|
||||
This page doesn't exist.
|
||||
</p>
|
||||
<div className="pt-2">
|
||||
<Link
|
||||
href="/"
|
||||
className="inline-flex items-center justify-center rounded-md bg-primary-blue px-4 py-2 text-sm font-medium text-white hover:bg-primary-blue/80 transition-colors"
|
||||
>
|
||||
Drive home
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
22
apps/website/app/500/page.tsx
Normal file
22
apps/website/app/500/page.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function Custom500Page() {
|
||||
return (
|
||||
<main className="min-h-screen flex items-center justify-center bg-deep-graphite text-white px-6">
|
||||
<div className="max-w-md text-center space-y-4">
|
||||
<h1 className="text-3xl font-semibold">500</h1>
|
||||
<p className="text-sm text-gray-400">
|
||||
Something went wrong.
|
||||
</p>
|
||||
<div className="pt-2">
|
||||
<Link
|
||||
href="/"
|
||||
className="inline-flex items-center justify-center rounded-md bg-primary-blue px-4 py-2 text-sm font-medium text-white hover:bg-primary-blue/80 transition-colors"
|
||||
>
|
||||
Drive home
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
37
apps/website/app/error.tsx
Normal file
37
apps/website/app/error.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
'use client';
|
||||
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function ErrorPage({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error & { digest?: string };
|
||||
reset: () => void;
|
||||
}) {
|
||||
return (
|
||||
<main className="min-h-screen flex items-center justify-center bg-deep-graphite text-white px-6">
|
||||
<div className="max-w-md text-center space-y-4">
|
||||
<h1 className="text-3xl font-semibold">Something went wrong</h1>
|
||||
<p className="text-sm text-gray-400">
|
||||
{error?.message ? error.message : 'An unexpected error occurred.'}
|
||||
</p>
|
||||
<div className="flex items-center justify-center gap-3 pt-2">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => reset()}
|
||||
className="inline-flex items-center justify-center rounded-md bg-primary-blue px-4 py-2 text-sm font-medium text-white hover:bg-primary-blue/80 transition-colors"
|
||||
>
|
||||
Try again
|
||||
</button>
|
||||
<Link
|
||||
href="/"
|
||||
className="inline-flex items-center justify-center rounded-md bg-iron-gray px-4 py-2 text-sm font-medium text-white hover:bg-iron-gray/80 transition-colors"
|
||||
>
|
||||
Go home
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import type { Metadata } from 'next';
|
||||
import type { Metadata, Viewport } from 'next';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import './globals.css';
|
||||
@@ -14,16 +14,17 @@ import { ServiceProvider } from '@/lib/services/ServiceProvider';
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export const viewport: Viewport = {
|
||||
width: 'device-width',
|
||||
initialScale: 1,
|
||||
maximumScale: 1,
|
||||
userScalable: false,
|
||||
viewportFit: 'cover',
|
||||
};
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'GridPilot - iRacing League Racing Platform',
|
||||
description: 'The dedicated home for serious iRacing leagues. Automatic results, standings, team racing, and professional race control.',
|
||||
viewport: {
|
||||
width: 'device-width',
|
||||
initialScale: 1,
|
||||
maximumScale: 1,
|
||||
userScalable: false,
|
||||
viewportFit: 'cover',
|
||||
},
|
||||
themeColor: '#0a0a0a',
|
||||
appleWebApp: {
|
||||
capable: true,
|
||||
|
||||
22
apps/website/app/not-found.tsx
Normal file
22
apps/website/app/not-found.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<main className="min-h-screen flex items-center justify-center bg-deep-graphite text-white px-6">
|
||||
<div className="max-w-md text-center space-y-4">
|
||||
<h1 className="text-3xl font-semibold">Page not found</h1>
|
||||
<p className="text-sm text-gray-400">
|
||||
The page you requested doesn't exist (or isn't available in this mode).
|
||||
</p>
|
||||
<div className="pt-2">
|
||||
<Link
|
||||
href="/"
|
||||
className="inline-flex items-center justify-center rounded-md bg-primary-blue px-4 py-2 text-sm font-medium text-white hover:bg-primary-blue/80 transition-colors"
|
||||
>
|
||||
Drive home
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user