From a1ac45773352df2066b8ae181dd3b0d15d1c54e5 Mon Sep 17 00:00:00 2001 From: Marius Ahsmus Date: Mon, 27 Apr 2026 20:55:48 +0200 Subject: [PATCH 01/11] feat: dynamically render payload blocks to landing, and product pages, removed editionherosection & introduced centered prop to herosection to display the old editionhero in the product pages --- .../[locale]/community-edition/page.tsx | 28 +--- .../[locale]/enterprise-edition/page.tsx | 33 +--- src/app/(landing)/[locale]/page.tsx | 43 +---- src/blocks/EditionHeroBlock.ts | 81 ---------- src/blocks/HeroBlock.ts | 33 ++++ src/collections/pages.ts | 3 +- src/components/PageBlockRenderer.tsx | 60 +++++++ .../sections/EditionHeroSection.tsx | 112 ------------- src/components/sections/HeroSection.tsx | 101 ++++++++++-- src/lib/cms.ts | 1 - .../20260427_010_remove_edition_hero_block.ts | 149 ++++++++++++++++++ src/migrations/index.ts | 6 + src/payload-types.ts | 53 ++----- tsconfig.json | 3 +- 14 files changed, 361 insertions(+), 345 deletions(-) delete mode 100644 src/blocks/EditionHeroBlock.ts create mode 100644 src/components/PageBlockRenderer.tsx delete mode 100644 src/components/sections/EditionHeroSection.tsx create mode 100644 src/migrations/20260427_010_remove_edition_hero_block.ts diff --git a/src/app/(landing)/[locale]/community-edition/page.tsx b/src/app/(landing)/[locale]/community-edition/page.tsx index 7d2fb2e6..a4a14fab 100644 --- a/src/app/(landing)/[locale]/community-edition/page.tsx +++ b/src/app/(landing)/[locale]/community-edition/page.tsx @@ -1,8 +1,4 @@ -import { CtaSection } from "@/components/sections/CtaSection" -import { EditionFeatureSection } from "@/components/sections/EditionFeatureSection" -import { EditionHeroSection } from "@/components/sections/EditionHeroSection" -import { EditionInstallSection } from "@/components/sections/EditionInstallSection" -import { EditionUseCaseSection } from "@/components/sections/EditionUseCaseSection" +import { PageBlocks } from "@/components/PageBlockRenderer" import { LandingContainer } from "@/components/ui/LandingContainer" import { getLandingPage } from "@/lib/cms" import { isSupportedLocale } from "@/lib/i18n" @@ -20,31 +16,11 @@ export default async function CommunityEditionPage({ params }: { params: Promise if (!isSupportedLocale(locale)) notFound() const page = await getLandingPage("community-edition", locale) - const heroBlock = page?.layout?.find((item) => item.blockType === "editionHero") ?? null - const featuresBlock = page?.layout?.find((item) => item.blockType === "editionFeatures") ?? null - const installBlock = page?.layout?.find((item) => item.blockType === "editionInstall") ?? null - const useCaseBlock = page?.layout?.find((item) => item.blockType === "editionUseCases") ?? null - const ctaBlock = page?.layout?.find((item) => item.blockType === "cta") ?? null return (