feat: improve structure and error handling

This commit is contained in:
Michael Zetterberg
2024-05-14 15:55:46 +02:00
parent 01587d7fd5
commit f5108d1a8e
104 changed files with 1505 additions and 1570 deletions

View File

@@ -1,7 +1,7 @@
export default function NotFound() {
return (
<main>
<h2>Not Found</h2>
<h1>Not found</h1>
<p>Could not find requested resource</p>
</main>
)

View File

@@ -0,0 +1,20 @@
import {
ContentTypeParams,
LangParams,
PageArgs,
UIDParams,
} from "@/types/params"
export default async function PreviewPage({
params,
searchParams,
}: PageArgs<LangParams & ContentTypeParams & UIDParams, {}>) {
return (
<div>
<p>
Preview for {params.contentType}:{params.uid} in {params.lang} with
params <pre>{JSON.stringify(searchParams, null, 2)}</pre> goes here
</p>
</div>
)
}

View File

@@ -1,3 +0,0 @@
export default async function PreviewPage() {
return null
}