Skip to content

Commit d75e0f2

Browse files
committed
return null for generateMetadata
1 parent b2b6c9f commit d75e0f2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/[domain]/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export async function generateMetadata({
1212
params,
1313
}: {
1414
params: { domain: string };
15-
}): Promise<Metadata> {
15+
}): Promise<Metadata | null> {
1616
const data = await getSiteData(params.domain);
1717
if (!data) {
18-
notFound();
18+
return null;
1919
}
2020
const {
2121
name: title,

app/[domain]/not-found.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Image from "next/image";
22

33
export default function NotFound() {
4-
console.log("404 on app/[domain]/not-found.tsx");
54
return (
65
<div className="flex flex-col items-center justify-center">
76
<h1 className="font-cal text-4xl">404</h1>

0 commit comments

Comments
 (0)