return 404 on no data for blogposts/events

This commit is contained in:
leander committed 2026-10-30 21:02:32 +01:00
1 parent 39ad3947fd
commit 38f1ba69b4
2 files changed
+4

No files matched your search

+2
View File
@@ -41,6 +41,8 @@ export async function generateMetadata({
const { slug } = await params
const data = await getBlogPost(slug)
if (!data) notFound()
return generateSeoMetadata({
title: data.title,
description: data.excerpt,
+2
View File
@@ -25,6 +25,8 @@ export async function generateMetadata({
const { slug } = await params
const data = await getEvent(slug)
if (!data) notFound()
const locale = await getLocale()
const t = await getTranslations("metaTags")