From 4299206097c027a463cc97fa9503f6b68aa3610a Mon Sep 17 00:00:00 2001 From: MichalC <103170279+wSBMichalee@users.noreply.github.com> Date: Fri, 18 Sep 2026 00:21:55 +0200 Subject: [PATCH] feat(hero): remove floating stat component as requested --- src/blocks/Hero/Component.tsx | 36 +---------------------------------- src/blocks/Hero/config.ts | 9 +-------- src/payload-types.ts | 10 ---------- 3 files changed, 2 insertions(+), 53 deletions(-) diff --git a/src/blocks/Hero/Component.tsx b/src/blocks/Hero/Component.tsx index 883c900..c1d1611 100644 --- a/src/blocks/Hero/Component.tsx +++ b/src/blocks/Hero/Component.tsx @@ -40,7 +40,6 @@ export const HeroBlock: React.FC = ({ primaryCta, secondaryCta, image, - floatingStat, whatsappNumber, }) => { const whatsappLink = whatsappNumber ? `https://wa.me/${whatsappNumber}` : '#' @@ -49,9 +48,6 @@ export const HeroBlock: React.FC = ({ const imageUrl = heroMedia?.url const imageAlt = heroMedia?.alt || 'Tło hero' - const statValue = floatingStat?.value || '20+' - const statLabel = floatingStat?.label || 'Lat doświadczenia' - return ( = ({ - {/* Floating Stat "Seal" (Bottom Right) */} - - {/* Dekoracyjna krawędź przypominająca stempel */} -
- - {statValue} - - - {statLabel} - - - - {/* Mobile version of the seal - more inline */} - - - {statValue} - - - {statLabel} - - +
diff --git a/src/blocks/Hero/config.ts b/src/blocks/Hero/config.ts index bd7d811..cd540ed 100644 --- a/src/blocks/Hero/config.ts +++ b/src/blocks/Hero/config.ts @@ -15,14 +15,7 @@ export const Hero: Block = { { name: 'url', type: 'text' }, ], }, - { - name: 'floatingStat', - type: 'group', - fields: [ - { name: 'value', type: 'text', localized: true, defaultValue: '20+' }, - { name: 'label', type: 'text', localized: true, defaultValue: 'Lat doświadczenia' }, - ], - }, + { name: 'image', type: 'upload', relationTo: 'media' }, { name: 'imageSecondary', type: 'upload', relationTo: 'media' }, ], diff --git a/src/payload-types.ts b/src/payload-types.ts index 7aec474..4dc330d 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -333,10 +333,6 @@ export interface Page { text?: string | null; url?: string | null; }; - floatingStat?: { - value?: string | null; - label?: string | null; - }; image?: (number | null) | Media; imageSecondary?: (number | null) | Media; id?: string | null; @@ -1030,12 +1026,6 @@ export interface PagesSelect { text?: T; url?: T; }; - floatingStat?: - | T - | { - value?: T; - label?: T; - }; image?: T; imageSecondary?: T; id?: T;