1+ import { DeploymentImage } from "@/components/DeploymentImage"
2+ import { PageBlocks } from "@/components/PageBlockRenderer"
13import { LandingContainer } from "@/components/ui/LandingContainer"
2- import { HeroSection } from "@/components/sections/HeroSection"
3- import { BrandSection } from "@/components/sections/BrandSection"
4- import { UseCaseSection } from "@/components/sections/UseCaseSection"
5- import { AppFeatureSection } from "@/components/sections/AppFeatureSection"
6- import { DeploymentSection } from "@/components/sections/DeploymentSection"
7- import { RuntimeFeatureSection } from "@/components/sections/RuntimeFeatureSection"
8- import { RoadmapSection } from "@/components/sections/RoadmapSection"
9- import { FaqSection } from "@/components/sections/FaqSection"
10- import { CtaSection } from "@/components/sections/CtaSection"
114import { getLandingPage } from "@/lib/cms"
125import type { DeploymentLayoutBlock , HeroLayoutBlock } from "@/lib/cms"
136import type { BrandLayoutBlock } from "@/lib/cms"
@@ -26,38 +19,22 @@ export async function generateMetadata({ params }: { params: Promise<{ locale: s
2619
2720export default async function Page ( { params } : { params : Promise < { locale : string } > } ) {
2821 const { locale } = await params
29- if ( ! isSupportedLocale ( locale ) ) {
30- notFound ( )
31- }
22+ if ( ! isSupportedLocale ( locale ) ) notFound ( )
3223
3324 const page = await getLandingPage ( "main" , locale )
34- const layout = page ?. layout ?? [ ]
35- const heroBlock = layout . find ( ( block ) : block is HeroLayoutBlock => block . blockType === "hero" ) ?? null
36- const brandBlock = layout . find ( ( block ) : block is BrandLayoutBlock => block . blockType === "brand" ) ?? null
37- const useCaseBlock = layout . find ( ( block ) : block is UseCaseLayoutBlock => block . blockType === "usecase" ) ?? null
38- const faqBlock = layout . find ( ( block ) : block is FaqLayoutBlock => block . blockType === "faq" ) ?? null
39- const ctaBlock = layout . find ( ( block ) : block is CtaLayoutBlock => block . blockType === "cta" ) ?? null
40- const deploymentBlock = layout . find ( ( block ) : block is DeploymentLayoutBlock => block . blockType === "deployment" ) ?? null
4125
4226 return (
4327 < LandingContainer >
4428 < div className = "h-12 lg:h-16" aria-hidden = "true" />
45- < HeroSection content = { heroBlock } />
46- < BrandSection content = { brandBlock } />
47- < div className = "h-32" aria-hidden = "true" />
48- < UseCaseSection content = { useCaseBlock } />
49- < div className = "h-32" aria-hidden = "true" />
50- < AppFeatureSection locale = { locale } />
51- < div className = "h-32" aria-hidden = "true" />
52- < DeploymentSection content = { deploymentBlock } />
53- < div className = "h-32" aria-hidden = "true" />
54- < RuntimeFeatureSection locale = { locale } />
55- < div className = "h-32" aria-hidden = "true" />
56- < RoadmapSection locale = { locale } />
57- < div className = "h-32" aria-hidden = "true" />
58- < FaqSection content = { faqBlock } />
59- < div className = "h-32" aria-hidden = "true" />
60- < CtaSection content = { ctaBlock } />
29+ < PageBlocks
30+ blocks = { page ?. layout }
31+ locale = { locale }
32+ cardRowChildren = { [
33+ < DeploymentImage key = "cloud" color = "aqua" icon = "cloud" text = "Cloud" /> ,
34+ < DeploymentImage key = "selfhost" color = "pink" icon = "server" text = "Selfhost" /> ,
35+ < DeploymentImage key = "dynamic" color = "brand" icon = "cloud-computing" text = "Dynamic" /> ,
36+ ] }
37+ />
6138 </ LandingContainer >
6239 )
6340}
0 commit comments