fix: migrate all hardcoded eyebrow labels and text to CMS to fix locale bleeding
This commit is contained in:
@@ -6,15 +6,17 @@ import type { Page } from '../../payload-types'
|
||||
|
||||
type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'affiliation' }>
|
||||
|
||||
export const AffiliationBlock: React.FC<Props> = ({ title, description, logo, linkText }) => {
|
||||
export const AffiliationBlock: React.FC<Props> = ({ eyebrow, title, description, logo, linkText }) => {
|
||||
return (
|
||||
<section className="py-20 md:py-32 bg-background border-t border-border overflow-hidden">
|
||||
<div className="container-premium">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-16 lg:gap-24 items-center">
|
||||
<div className="max-w-3xl">
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// Zaufanie
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold tracking-tight text-foreground mb-6 text-balance">
|
||||
{title}
|
||||
</h2>
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Block } from 'payload'
|
||||
export const Affiliation: Block = {
|
||||
slug: 'affiliation',
|
||||
fields: [
|
||||
{ name: 'eyebrow', type: 'text', localized: true },
|
||||
{ name: 'title', type: 'text', required: true, localized: true },
|
||||
{ name: 'description', type: 'textarea', required: true, localized: true },
|
||||
{ name: 'logo', type: 'upload', relationTo: 'media' },
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react'
|
||||
import { CheckCircle2, XCircle, AlertTriangle, ShieldAlert } from 'lucide-react'
|
||||
|
||||
export interface EligibilityProps {
|
||||
eyebrow?: string | null
|
||||
title: string
|
||||
subtitle?: string | null
|
||||
eligibleTitle: string
|
||||
@@ -13,8 +14,7 @@ export interface EligibilityProps {
|
||||
legalNotice?: string | null
|
||||
}
|
||||
|
||||
export const EligibilityBlock: React.FC<EligibilityProps> = ({
|
||||
title,
|
||||
export const EligibilityBlock: React.FC<EligibilityProps> = ({ eyebrow, title,
|
||||
subtitle,
|
||||
eligibleTitle,
|
||||
eligibleItems,
|
||||
@@ -28,9 +28,11 @@ export const EligibilityBlock: React.FC<EligibilityProps> = ({
|
||||
<section className="py-12 md:py-20 bg-card/60 border-y border-border">
|
||||
<div className="container-premium">
|
||||
<div className="max-w-3xl mb-12 text-center md:text-left">
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// Zakres uprawnień doradczych
|
||||
</div>
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold text-foreground tracking-tight">
|
||||
{title}
|
||||
</h2>
|
||||
|
||||
@@ -6,14 +6,16 @@ import type { Page } from '../../payload-types'
|
||||
|
||||
type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'faqTeaser' }>
|
||||
|
||||
export const FAQTeaserBlock: React.FC<Props> = ({ title, questions, linkText }) => {
|
||||
export const FAQTeaserBlock: React.FC<Props> = ({ eyebrow, title, questions, linkText }) => {
|
||||
return (
|
||||
<section className="py-20 md:py-32 bg-card/40 border-t border-border">
|
||||
<div className="container-premium">
|
||||
<div className="max-w-3xl mb-16 md:mb-24">
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// FAQ
|
||||
</div>
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold text-foreground tracking-tight text-balance">
|
||||
{title}
|
||||
</h2>
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Block } from 'payload'
|
||||
export const FAQTeaser: Block = {
|
||||
slug: 'faqTeaser',
|
||||
fields: [
|
||||
{ name: 'eyebrow', type: 'text', localized: true },
|
||||
{ name: 'title', type: 'text', required: true, localized: true },
|
||||
{
|
||||
name: 'questions',
|
||||
|
||||
@@ -5,14 +5,16 @@ import { MessageCircle } from 'lucide-react'
|
||||
|
||||
type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'finalCta' }>
|
||||
|
||||
export const FinalCTABlock: React.FC<Props> = ({ title, subtitle, buttonText }) => {
|
||||
export const FinalCTABlock: React.FC<Props> = ({ eyebrow, title, subtitle, buttonText }) => {
|
||||
return (
|
||||
<section className="py-20 md:py-32 bg-card border-y border-border text-left">
|
||||
<div className="container-premium">
|
||||
<div className="max-w-3xl">
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// Kontakt
|
||||
</div>
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold text-foreground tracking-tight mb-6 text-balance">
|
||||
{title}
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Block } from 'payload'
|
||||
export const FinalCTA: Block = {
|
||||
slug: 'finalCta',
|
||||
fields: [
|
||||
{ name: 'eyebrow', type: 'text', localized: true },
|
||||
{ name: 'title', type: 'text', required: true, localized: true },
|
||||
{ name: 'subtitle', type: 'text', localized: true },
|
||||
{ name: 'buttonText', type: 'text', required: true, localized: true },
|
||||
|
||||
@@ -6,20 +6,24 @@ import { ArrowRight } from 'lucide-react'
|
||||
|
||||
type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'process' }>
|
||||
|
||||
export const ProcessBlock: React.FC<Props> = ({ title, steps, ctaText }) => {
|
||||
export const ProcessBlock: React.FC<Props> = ({ eyebrow, subtitle, title, steps, ctaText }) => {
|
||||
return (
|
||||
<section className="py-20 md:py-32 bg-background text-foreground overflow-hidden">
|
||||
<div className="container-premium">
|
||||
<div className="max-w-3xl mb-16 md:mb-24">
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// Proces
|
||||
</div>
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold tracking-tight text-foreground mb-6 text-balance">
|
||||
{title}
|
||||
</h2>
|
||||
<p className="text-foreground/75 text-lg md:text-xl font-light leading-relaxed">
|
||||
Prosty i przejrzysty proces rozliczenia w 3 krokach — bez zbędnych formalności.
|
||||
</p>
|
||||
{subtitle && (
|
||||
<p className="text-foreground/75 text-lg md:text-xl font-light leading-relaxed">
|
||||
{subtitle}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-16 lg:gap-24 items-center">
|
||||
|
||||
@@ -3,7 +3,9 @@ import type { Block } from 'payload'
|
||||
export const Process: Block = {
|
||||
slug: 'process',
|
||||
fields: [
|
||||
{ name: 'eyebrow', type: 'text', localized: true },
|
||||
{ name: 'title', type: 'text', required: true, localized: true },
|
||||
{ name: 'subtitle', type: 'textarea', localized: true },
|
||||
{
|
||||
name: 'steps',
|
||||
type: 'array',
|
||||
|
||||
@@ -21,6 +21,7 @@ const iconMap: Record<string, LucideIcon> = {
|
||||
}
|
||||
|
||||
export interface ServicesDetailedProps {
|
||||
eyebrow?: string | null
|
||||
title: string
|
||||
subtitle?: string | null
|
||||
services?: Array<{
|
||||
@@ -31,8 +32,7 @@ export interface ServicesDetailedProps {
|
||||
}> | null
|
||||
}
|
||||
|
||||
export const ServicesDetailedBlock: React.FC<ServicesDetailedProps> = ({
|
||||
title,
|
||||
export const ServicesDetailedBlock: React.FC<ServicesDetailedProps> = ({ eyebrow, title,
|
||||
subtitle,
|
||||
services,
|
||||
}) => {
|
||||
@@ -40,9 +40,11 @@ export const ServicesDetailedBlock: React.FC<ServicesDetailedProps> = ({
|
||||
<section className="py-12 md:py-16">
|
||||
<div className="container-premium">
|
||||
<div className="max-w-3xl mb-12">
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// Usługi
|
||||
</div>
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold text-foreground tracking-tight text-balance">
|
||||
{title}
|
||||
</h2>
|
||||
|
||||
@@ -6,14 +6,16 @@ import { ArrowRight } from 'lucide-react'
|
||||
|
||||
type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'servicesList' }>
|
||||
|
||||
export const ServicesListBlock: React.FC<Props> = ({ title, services }) => {
|
||||
export const ServicesListBlock: React.FC<Props> = ({ eyebrow, title, services }) => {
|
||||
return (
|
||||
<section className="py-20 md:py-32 bg-background text-foreground">
|
||||
<div className="container-premium">
|
||||
<div className="max-w-3xl mb-16 md:mb-24">
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// Usługi
|
||||
</div>
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold text-foreground tracking-tight max-w-2xl text-balance">
|
||||
{title}
|
||||
</h2>
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Block } from 'payload'
|
||||
export const ServicesList: Block = {
|
||||
slug: 'servicesList',
|
||||
fields: [
|
||||
{ name: 'eyebrow', type: 'text', localized: true },
|
||||
{ name: 'title', type: 'text', required: true, localized: true },
|
||||
{
|
||||
name: 'services',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import React from 'react'
|
||||
|
||||
export interface StatsProps {
|
||||
eyebrow?: string | null
|
||||
title?: string | null
|
||||
subtitle?: string | null
|
||||
items?: Array<{
|
||||
@@ -12,7 +13,7 @@ export interface StatsProps {
|
||||
}> | null
|
||||
}
|
||||
|
||||
export const StatsBlock: React.FC<StatsProps> = ({ title, subtitle, items }) => {
|
||||
export const StatsBlock: React.FC<StatsProps> = ({ eyebrow, title, subtitle, items }) => {
|
||||
if (!items || items.length === 0) return null
|
||||
|
||||
return (
|
||||
@@ -20,9 +21,11 @@ export const StatsBlock: React.FC<StatsProps> = ({ title, subtitle, items }) =>
|
||||
<div className="container-premium">
|
||||
{(title || subtitle) && (
|
||||
<div className="max-w-3xl mb-16 md:mb-24">
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// Statystyki
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
{title && (
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold text-foreground mb-6 tracking-tight text-balance">
|
||||
{title}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { CheckCircle } from 'lucide-react'
|
||||
|
||||
type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'uniqueValue' }>
|
||||
|
||||
export const UniqueValueBlock: React.FC<Props> = ({ title, description }) => {
|
||||
export const UniqueValueBlock: React.FC<Props> = ({ eyebrow, features, title, description }) => {
|
||||
return (
|
||||
<section className="py-20 md:py-32 bg-card/60 border-y border-border">
|
||||
<div className="container-premium">
|
||||
@@ -27,9 +27,11 @@ export const UniqueValueBlock: React.FC<Props> = ({ title, description }) => {
|
||||
|
||||
{/* Kolumna tekstowa */}
|
||||
<div className="lg:col-span-7 order-1 lg:order-2 flex flex-col items-start max-w-3xl">
|
||||
{eyebrow && (
|
||||
<div className="font-mono text-sm md:text-base font-bold text-accent tracking-widest uppercase mb-4">
|
||||
// Wartość
|
||||
// {eyebrow}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<h2 className="font-heading text-3xl sm:text-4xl md:text-5xl font-extrabold text-foreground tracking-tight mb-6 text-balance">
|
||||
{title}
|
||||
@@ -39,16 +41,16 @@ export const UniqueValueBlock: React.FC<Props> = ({ title, description }) => {
|
||||
{description}
|
||||
</p>
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-6 w-full pt-6 border-t border-border/60 text-base">
|
||||
<div className="flex items-center gap-2.5 text-foreground/80 font-medium">
|
||||
<span className="w-2 h-2 rounded-full bg-accent" />
|
||||
<span>Bez barier językowych</span>
|
||||
{features && features.length > 0 && (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-6 w-full pt-6 border-t border-border/60 text-base">
|
||||
{features.map((feature: any, index: number) => (
|
||||
<div key={feature.id || index} className="flex items-center gap-2.5 text-foreground/80 font-medium">
|
||||
<span className="w-2 h-2 rounded-full bg-accent" />
|
||||
<span>{feature.text}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex items-center gap-2.5 text-foreground/80 font-medium">
|
||||
<span className="w-2 h-2 rounded-full bg-accent" />
|
||||
<span>Indywidualne podejście</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,16 @@ import type { Block } from 'payload'
|
||||
export const UniqueValue: Block = {
|
||||
slug: 'uniqueValue',
|
||||
fields: [
|
||||
{ name: 'eyebrow', type: 'text', localized: true },
|
||||
{ name: 'title', type: 'text', required: true, localized: true },
|
||||
{ name: 'description', type: 'textarea', required: true, localized: true },
|
||||
{
|
||||
name: 'features',
|
||||
type: 'array',
|
||||
localized: true,
|
||||
fields: [
|
||||
{ name: 'text', type: 'text', required: true },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user