mirror of
https://github.com/UiO-Gaming/uiogaming.no.git
synced 2026-11-05 13:56:47 +01:00
return 404 on no data for blogposts/events
This commit is contained in:
1 parent
39ad3947fd
commit
38f1ba69b4
2 files changed
+4
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in new issue
Block a user