Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
aa4c8f3
feat: imporve footer & added section heading highlighting
mvriu5 May 22, 2026
b94e693
fix: remove force-dynamic
mvriu5 May 23, 2026
046e04c
feat: remove blog sorting in page client
mvriu5 May 23, 2026
c5f8975
feat: generic functions for cms
mvriu5 May 23, 2026
0414be6
feat: remove unnecessary renderBlock call
mvriu5 May 23, 2026
ef821f3
feat: extract navigation scrollstate & view model
mvriu5 May 23, 2026
05ea9ef
feat: page Helper functions
mvriu5 May 23, 2026
ed48d66
feat: improve lint command
mvriu5 May 23, 2026
bb49108
feat: helper funciton for page locale with slug
mvriu5 May 23, 2026
a26e4c5
feat: use page functions in blog page
mvriu5 May 23, 2026
e67f3e0
feat: remove switch in blockRenderer
mvriu5 May 23, 2026
75755cd
feat: find page block helper
mvriu5 May 23, 2026
7313e49
feat: section heading exit window animation
mvriu5 May 23, 2026
b1e4c8c
feat: reworked navigation
mvriu5 May 24, 2026
b3617ad
feat: navbarButton collection & logic
mvriu5 May 24, 2026
c5784da
feat: improve hero text readibility
mvriu5 May 24, 2026
843ae7f
feat: footer layout changes
mvriu5 May 25, 2026
e1f4fd3
feat: imrpvoe link button style
mvriu5 May 25, 2026
7067ead
feat: offsetcards improved
mvriu5 May 25, 2026
00707d1
fix: globals
mvriu5 May 25, 2026
6ade56e
feat: improve block markdown style
mvriu5 May 25, 2026
7597855
feat: add textreveal, improve footer
mvriu5 May 26, 2026
da1f721
feat: section layout in cms
mvriu5 May 26, 2026
415cfa0
Update payload-types.ts
mvriu5 May 26, 2026
a6967f6
feat: navigation back to floating
mvriu5 May 26, 2026
195596d
feat: improve naivgation animations
mvriu5 May 29, 2026
36d080b
feat: section decorator for breaking lines
mvriu5 May 30, 2026
b80d436
feat: brand section marquee, enabled paylod live preview
mvriu5 May 30, 2026
a001541
fix wrong collection name
mvriu5 May 30, 2026
2243549
feat: remove textreveal
mvriu5 May 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,780 changes: 3,666 additions & 114 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
"migrate:create": "payload migrate:create",
"migrate:status": "payload migrate:status",
"generate:importmap": "payload generate:importmap",
"lint": "next lint",
"lint": "npm run typecheck",
"typecheck": "tsc --noEmit",
"knip": "node --import tsx ./node_modules/knip/bin/knip.js",
"generate": "payload generate:types"
},
"dependencies": {
"@base-ui/react": "^1.5.0",
"@c15t/nextjs": "^2.1.0",
"@c15t/scripts": "^2.1.0",
"@code0-tech/pictor": "^0.7.2",
Expand All @@ -29,6 +31,7 @@
"@payloadcms/plugin-seo": "3.84.1",
"@payloadcms/richtext-lexical": "3.84.1",
"@tabler/icons-react": "3.41.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"graphql": "^16.14.0",
"knip": "^6.14.1",
Expand All @@ -40,8 +43,10 @@
"react": "^19.2.6",
"react-dom": "^19.2.6",
"sass": "^1.100.0",
"shadcn": "^4.8.0",
"sharp": "^0.34.5",
"tailwind-merge": "^3.6.0",
"tw-animate-css": "^1.4.0",
"web-haptics": "^0.0.6"
},
"devDependencies": {
Expand Down
54 changes: 27 additions & 27 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>http://localhost:3000</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority><xhtml:link rel="alternate" hreflang="en" href="http://localhost:3000/en"/><xhtml:link rel="alternate" hreflang="de" href="http://localhost:3000/de"/></url>
<url><loc>http://localhost:3000/en</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>1</priority></url>
<url><loc>http://localhost:3000/en/about-us</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/actions</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/blog</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/community-edition</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/contact</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/enterprise-edition</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/features</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/jobs</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/legal-notice</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/privacy</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/subscription</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/terms</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>1</priority></url>
<url><loc>http://localhost:3000/de/about-us</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/actions</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/blog</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/community-edition</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/contact</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/enterprise-edition</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/features</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/jobs</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/legal-notice</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/privacy</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/subscription</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/terms</loc><lastmod>2026-05-13T05:17:48.888Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000</loc><lastmod>2026-05-24T07:40:24.625Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority><xhtml:link rel="alternate" hreflang="en" href="http://localhost:3000/en"/><xhtml:link rel="alternate" hreflang="de" href="http://localhost:3000/de"/></url>
<url><loc>http://localhost:3000/en</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>1</priority></url>
<url><loc>http://localhost:3000/en/about-us</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/actions</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/blog</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/community-edition</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/contact</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/enterprise-edition</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/features</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/jobs</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/legal-notice</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/privacy</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/subscription</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/en/terms</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>1</priority></url>
<url><loc>http://localhost:3000/de/about-us</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/actions</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/blog</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/community-edition</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/contact</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/enterprise-edition</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/features</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/jobs</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/legal-notice</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/privacy</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/subscription</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
<url><loc>http://localhost:3000/de/terms</loc><lastmod>2026-05-24T07:40:24.626Z</lastmod><changefreq>weekly</changefreq><priority>0.7</priority></url>
</urlset>
21 changes: 7 additions & 14 deletions src/app/(landing)/[locale]/about-us/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,18 @@ import { TeamMemberCard } from "@/components/cards/TeamMemberCard"
import { MarkdownContent } from "@/components/blog/MarkdownContent"
import { Aurora } from "@/components/ui/Aurora"
import { LandingContainer } from "@/components/ui/LandingContainer"
import { MarkdownLayoutBlock, getLandingPage, getTeamMembers } from "@/lib/cms"
import { isSupportedLocale } from "@/lib/i18n"
import { getLandingPageMetadata } from "@/lib/pageMetadata"
import { createLandingMetadata, getPageLocale, type LocalePageParams } from "@/lib/appRoute"
import { getLandingPage, getTeamMembers } from "@/lib/cms"
import { findPageBlock } from "@/lib/pageBlocks"
import { convertLexicalToHTML } from "@payloadcms/richtext-lexical/html"
import type { Metadata } from "next"
import { notFound } from "next/navigation"

export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
const { locale } = await params
return getLandingPageMetadata("about-us", locale)
}

export default async function AboutPage({ params }: { params: Promise<{ locale: string }> }) {
const { locale } = await params
if (!isSupportedLocale(locale)) notFound()
export const generateMetadata = createLandingMetadata("about-us")

export default async function AboutPage({ params }: { params: LocalePageParams }) {
const locale = await getPageLocale(params)
const aboutUsPage = await getLandingPage("about-us", locale)
const teamMembers = await getTeamMembers(locale)
const markdownBlock = aboutUsPage?.layout?.find((block): block is MarkdownLayoutBlock => block.blockType === "markdown") ?? null
const markdownBlock = findPageBlock(aboutUsPage, "markdown")
const contentHtml = markdownBlock
? convertLexicalToHTML({ data: markdownBlock.content, disableContainer: true })
: ""
Expand Down
18 changes: 8 additions & 10 deletions src/app/(landing)/[locale]/actions/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ import { Aurora } from "@/components/ui/Aurora"
import { HapticButtonLink } from "@/components/ui/HapticButtonLink"
import { LandingContainer } from "@/components/ui/LandingContainer"
import { LinkButton } from "@/components/ui/LinkButton"
import { getActionBySlug, getLandingPage, type ActionsLayoutBlock } from "@/lib/cms"
import { isSupportedLocale } from "@/lib/i18n"
import { getPageLocaleAndSlug, type LocaleSlugPageParams } from "@/lib/appRoute"
import { getActionBySlug, getLandingPage } from "@/lib/cms"
import { getMediaUrl } from "@/lib/media"
import { findPageBlock } from "@/lib/pageBlocks"
import { createMetadata } from "@/lib/siteConfig"
import type { Media } from "@/payload-types"
import { IconArrowLeft, IconExternalLink } from "@tabler/icons-react"
import type { Metadata } from "next"
import Image from "next/image"
import { notFound } from "next/navigation"

export default async function ActionDetailPage({ params }: { params: Promise<{ locale: string, slug: string }> }) {
const { locale, slug } = await params
if (!isSupportedLocale(locale)) notFound()
if (!slug?.trim()) notFound()

export default async function ActionDetailPage({ params }: { params: LocaleSlugPageParams }) {
const { locale, slug } = await getPageLocaleAndSlug(params)
const action = await getActionBySlug(slug, locale)
if (!action) notFound()
const actionsPage = await getLandingPage("actions", locale)
Expand All @@ -29,7 +27,7 @@ export default async function ActionDetailPage({ params }: { params: Promise<{ l
const functionDefs = action.functiondefinitions as Media | undefined
const references = (action.references ?? []).filter((reference): reference is Exclude<typeof reference, number> => typeof reference !== "number")
const tags = (action.tags ?? []).filter((tag): tag is string => Boolean(tag))
const actionsBlock = actionsPage?.layout?.find((block): block is ActionsLayoutBlock => block.blockType === "actions") ?? null
const actionsBlock = findPageBlock(actionsPage, "actions")
const referencesLabel = actionsBlock?.referencesLabel ?? (locale === "de" ? "Referenzen" : "References")

return (
Expand Down Expand Up @@ -125,10 +123,10 @@ export default async function ActionDetailPage({ params }: { params: Promise<{ l
)
}

export async function generateMetadata({ params }: { params: Promise<{ locale: string, slug: string }> }): Promise<Metadata> {
export async function generateMetadata({ params }: { params: LocaleSlugPageParams }): Promise<Metadata> {
const { locale, slug } = await params
if (!isSupportedLocale(locale)) return createMetadata()
if (!slug?.trim()) return createMetadata()
if (locale !== "de" && locale !== "en") return createMetadata()

const action = await getActionBySlug(slug, locale)
if (!action) return createMetadata()
Expand Down
21 changes: 7 additions & 14 deletions src/app/(landing)/[locale]/actions/page.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
import { ActionsPageClient } from "@/components/ActionsPageClient"
import { Aurora } from "@/components/ui/Aurora"
import { LandingContainer } from "@/components/ui/LandingContainer"
import { getActions, getLandingPage, type ActionsLayoutBlock } from "@/lib/cms"
import { isSupportedLocale } from "@/lib/i18n"
import { getLandingPageMetadata } from "@/lib/pageMetadata"
import { Metadata } from "next"
import { notFound } from "next/navigation"
import { createLandingMetadata, getPageLocale, type LocalePageParams } from "@/lib/appRoute"
import { getActions, getLandingPage } from "@/lib/cms"
import { findPageBlock } from "@/lib/pageBlocks"

export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
const { locale } = await params
return getLandingPageMetadata("actions", locale)
}

export default async function ActionsPage({ params }: { params: Promise<{ locale: string }> }) {
const { locale } = await params
if (!isSupportedLocale(locale)) notFound()
export const generateMetadata = createLandingMetadata("actions")

export default async function ActionsPage({ params }: { params: LocalePageParams }) {
const locale = await getPageLocale(params)
const [actions, actionsPage] = await Promise.all([
getActions(locale),
getLandingPage("actions", locale),
])
const actionsBlock = actionsPage?.layout?.find((block): block is ActionsLayoutBlock => block.blockType === "actions") ?? null
const actionsBlock = findPageBlock(actionsPage, "actions")

return (
<>
Expand Down
19 changes: 8 additions & 11 deletions src/app/(landing)/[locale]/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { InteractiveGridPattern } from "@/components/InteractiveGridPattern"
import { Aurora } from "@/components/ui/Aurora"
import { HapticButtonLink } from "@/components/ui/HapticButtonLink"
import { LandingContainer } from "@/components/ui/LandingContainer"
import { getBlogPostBySlug, getLandingPage, type CtaLayoutBlock } from "@/lib/cms"
import { isSupportedLocale } from "@/lib/i18n"
import { getPageLocaleAndSlug, type LocaleSlugPageParams } from "@/lib/appRoute"
import { getBlogPostBySlug, getLandingPage } from "@/lib/cms"
import { findPageBlock } from "@/lib/pageBlocks"
import { createMetadata, resolveSiteUrl } from "@/lib/siteConfig"
import { type Media } from "@/payload-types"
import type { Metadata } from "next"
Expand All @@ -21,14 +22,10 @@ function getMediaUrl(value?: number | Media | null) {
return new URL(value.url, resolveSiteUrl()).toString()
}

export default async function Page({ params }: { params: Promise<{ locale: string, slug: string }> }) {
const { locale, slug } = await params
if (!isSupportedLocale(locale)) notFound()
if (!slug?.trim()) notFound()

export default async function Page({ params }: { params: LocaleSlugPageParams }) {
const { locale, slug } = await getPageLocaleAndSlug(params)
const page = await getLandingPage("main", locale)
const layout = page?.layout ?? []
const ctaBlock = layout.find((block): block is CtaLayoutBlock => block.blockType === "cta") ?? null
const ctaBlock = findPageBlock(page, "cta")

return (
<>
Expand Down Expand Up @@ -83,10 +80,10 @@ export default async function Page({ params }: { params: Promise<{ locale: strin
)
}

export async function generateMetadata({ params }: { params: Promise<{ locale: string, slug: string }> }): Promise<Metadata> {
export async function generateMetadata({ params }: { params: LocaleSlugPageParams }): Promise<Metadata> {
const { locale, slug } = await params
if (!isSupportedLocale(locale)) return createMetadata()
if (!slug?.trim()) return createMetadata()
if (locale !== "de" && locale !== "en") return createMetadata()

const post = await getBlogPostBySlug(slug, locale)
if (!post) return createMetadata()
Expand Down
13 changes: 6 additions & 7 deletions src/app/(landing)/[locale]/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { BlogBlock } from "@/blocks/BlogBlock"
import { BlogPageClient } from "@/components/blog/BlogPageClient"
import { Aurora } from "@/components/ui/Aurora"
import { LandingContainer } from "@/components/ui/LandingContainer"
import { createLandingMetadata, getPageLocale, type LocalePageParams } from "@/lib/appRoute"
import { BlogLayoutBlock, getBlogPosts, getLandingPage } from "@/lib/cms"
import { isSupportedLocale } from "@/lib/i18n"
import { notFound } from "next/navigation"

const BLOG_PAGE_LABEL_FALLBACKS = {
de: {
viewOtherBlogsLabel: "Weitere Blogbeiträge",
noPostsLabel: "Keine Blogbeiträge verfügbar.",
loadMoreLabel: "Mehr laden",
loadingLabel: "Laedt...",
loadingLabel: "Lädt...",
},
en: {
viewOtherBlogsLabel: "View other blog posts",
Expand All @@ -21,9 +19,10 @@ const BLOG_PAGE_LABEL_FALLBACKS = {
},
} as const

export default async function BlogPage({ params }: { params: Promise<{ locale: string }> }) {
const { locale } = await params
if (!isSupportedLocale(locale)) notFound()
export const generateMetadata = createLandingMetadata("blog")

export default async function BlogPage({ params }: { params: LocalePageParams }) {
const locale = await getPageLocale(params)

const [posts, blogPage] = await Promise.all([
getBlogPosts(locale, { page: 1, limit: 10 }),
Expand Down
Loading