diff --git a/scripts/seed.ts b/scripts/seed.ts index 409fc47..27fc67b 100644 --- a/scripts/seed.ts +++ b/scripts/seed.ts @@ -1,6 +1,7 @@ import { getPayload } from 'payload' import configPromise from '../src/payload.config' import { toSlug } from '@intecion/ipal-kit' +import type { Page } from '../src/payload-types' const PAGES = [ { pl: 'Strona główna', de: 'Startseite', isHome: true }, @@ -177,7 +178,6 @@ async function run() { const pageIds: number[] = []; for (const page of PAGES) { - // @ts-ignore const createdPage = await payload.create({ collection: 'pages', data: { @@ -188,14 +188,13 @@ async function run() { blockType: 'TextSection', text: 'Treść w przygotowaniu', } - ]) as any + ]) as unknown as Page['layout'] }, locale: 'pl', }); pageIds.push(createdPage.id as unknown as number); - // @ts-ignore await payload.update({ collection: 'pages', id: createdPage.id, @@ -207,7 +206,7 @@ async function run() { blockType: 'TextSection', text: 'Inhalt in Vorbereitung', } - ]) as any + ]) as unknown as Page['layout'] }, locale: 'de', }); @@ -216,7 +215,6 @@ async function run() { } console.log('Seeding global header...') - // @ts-ignore await payload.updateGlobal({ slug: 'header', data: { @@ -225,7 +223,6 @@ async function run() { }); console.log('Seeding global company info...') - // @ts-ignore await payload.updateGlobal({ slug: 'company', data: { @@ -241,7 +238,6 @@ async function run() { const footerNavIndices = [0, 1, 2, 3, 4, 5, 7, 8, 9]; const footerNavPages = footerNavIndices.map(index => ({ page: pageIds[index] })); - // @ts-ignore await payload.updateGlobal({ slug: 'footer', data: { @@ -254,7 +250,6 @@ async function run() { }); console.log('Seeding site-settings (homepage)...') - // @ts-ignore await payload.updateGlobal({ slug: 'site-settings', data: { diff --git a/src/blocks/Affiliation/Component.tsx b/src/blocks/Affiliation/Component.tsx index e600a5a..fedbaa0 100644 --- a/src/blocks/Affiliation/Component.tsx +++ b/src/blocks/Affiliation/Component.tsx @@ -8,19 +8,19 @@ type Props = Extract[0], { blockType: 'affiliation' export const AffiliationBlock: React.FC = ({ title, description, logo, linkText }) => { return ( -
+
-

{title}

-

{description}

+

{title}

+

{description}

{linkText && ( - + {linkText} )} diff --git a/src/blocks/FAQTeaser/Component.tsx b/src/blocks/FAQTeaser/Component.tsx index 850835f..85822f8 100644 --- a/src/blocks/FAQTeaser/Component.tsx +++ b/src/blocks/FAQTeaser/Component.tsx @@ -8,36 +8,36 @@ type Props = Extract[0], { blockType: 'faqTeaser' }> export const FAQTeaserBlock: React.FC = ({ title, questions, linkText }) => { return ( -
+
{title}
- {questions?.map((q: any, index: number) => ( + {questions?.map((q: NonNullable[0], index: number) => ( -

{q.question}

-

{q.answer}

+

{q.question}

+

{q.answer}

))}
{linkText && (
- + {linkText}
diff --git a/src/blocks/FinalCTA/Component.tsx b/src/blocks/FinalCTA/Component.tsx index 1a280f0..2dd68f9 100644 --- a/src/blocks/FinalCTA/Component.tsx +++ b/src/blocks/FinalCTA/Component.tsx @@ -7,7 +7,7 @@ type Props = Extract[0], { blockType: 'finalCta' }> export const FinalCTABlock: React.FC = ({ title, subtitle, buttonText }) => { return ( -
+
= ({ title, subtitle, buttonText }) whileInView={{ opacity: 1, y: 0 }} viewport={{ once: true }} transition={{ duration: 0.5, delay: 0.1 }} - className="text-xl md:text-2xl text-blue-100 mb-12" + className="text-xl md:text-2xl text-white/80 mb-12" > {subtitle} diff --git a/src/blocks/Hero/Component.tsx b/src/blocks/Hero/Component.tsx index 97a4ea8..5d71fe1 100644 --- a/src/blocks/Hero/Component.tsx +++ b/src/blocks/Hero/Component.tsx @@ -8,8 +8,8 @@ type Props = Extract[0], { blockType: 'hero' }> export const HeroBlock: React.FC = ({ title, subtitle, primaryCta, secondaryCta, yearsOfExperience }) => { return ( -
-
+
+
= ({ title, subtitle, primaryCta, second initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.6, delay: 0.1 }} - className="text-xl md:text-2xl text-slate-300 mb-10 max-w-2xl" + className="text-xl md:text-2xl text-foreground/80 mb-10 max-w-2xl" > {subtitle} @@ -46,7 +46,7 @@ export const HeroBlock: React.FC = ({ title, subtitle, primaryCta, second {secondaryCta?.text && secondaryCta?.url && ( {secondaryCta.text} @@ -58,7 +58,7 @@ export const HeroBlock: React.FC = ({ title, subtitle, primaryCta, second initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ duration: 0.6, delay: 0.4 }} - className="text-sm text-slate-400 uppercase tracking-widest" + className="text-sm text-foreground/60 uppercase tracking-widest" > {yearsOfExperience} diff --git a/src/blocks/Process/Component.tsx b/src/blocks/Process/Component.tsx index 94fae63..78a1ac3 100644 --- a/src/blocks/Process/Component.tsx +++ b/src/blocks/Process/Component.tsx @@ -8,7 +8,7 @@ type Props = Extract[0], { blockType: 'process' }> export const ProcessBlock: React.FC = ({ title, steps, ctaText }) => { return ( -
+
= ({ title, steps, ctaText }) => {
{/* Linia łącząca na desktopie */} -
+
- {steps?.map((step: any, index: number) => ( + {steps?.map((step: NonNullable[0], index: number) => ( = ({ title, steps, ctaText }) => { transition={{ duration: 0.5, delay: index * 0.15 }} className="flex-1 relative z-10 text-center md:text-left flex flex-col items-center md:items-start" > -
+
{index + 1}

{step.title}

-

{step.description}

+

{step.description}

))}
@@ -50,7 +50,7 @@ export const ProcessBlock: React.FC = ({ title, steps, ctaText }) => { transition={{ duration: 0.5, delay: 0.6 }} className="mt-16 text-center" > - + {ctaText}
diff --git a/src/blocks/ServicesList/Component.tsx b/src/blocks/ServicesList/Component.tsx index 84aa549..19c4ef4 100644 --- a/src/blocks/ServicesList/Component.tsx +++ b/src/blocks/ServicesList/Component.tsx @@ -9,19 +9,19 @@ type Props = Extract[0], { blockType: 'servicesList' export const ServicesListBlock: React.FC = ({ title, services }) => { return ( -
+
{title}
- {services?.map((service: any, index: number) => ( + {services?.map((service: NonNullable[0], index: number) => ( = ({ title, services }) => { transition={{ duration: 0.5, delay: index * 0.1 }} className="group" > - -

{service.title}

-

{service.description}

-
+ +

{service.title}

+

{service.description}

+
{service.linkText}
diff --git a/src/blocks/Testimonials/Component.tsx b/src/blocks/Testimonials/Component.tsx index e9e9714..96a2fb4 100644 --- a/src/blocks/Testimonials/Component.tsx +++ b/src/blocks/Testimonials/Component.tsx @@ -8,30 +8,30 @@ type Props = Extract[0], { blockType: 'testimonials' export const TestimonialsBlock: React.FC = ({ title, testimonials }) => { return ( -
+
{title}
- {testimonials?.map((t: any, index: number) => ( + {testimonials?.map((t: NonNullable[0], index: number) => ( - -

"{t.quote}"

-
— {t.author}
+ +

"{t.quote}"

+
— {t.author}
))}
diff --git a/src/blocks/TrustBar/Component.tsx b/src/blocks/TrustBar/Component.tsx index 27de9df..5797a7e 100644 --- a/src/blocks/TrustBar/Component.tsx +++ b/src/blocks/TrustBar/Component.tsx @@ -17,10 +17,10 @@ export const TrustBarBlock: React.FC = ({ items }) => { if (!items || items.length === 0) return null return ( -
+
- {items.map((item: any, index: number) => { + {items.map((item: NonNullable[0], index: number) => { const Icon = item.icon ? iconMap[item.icon as keyof typeof iconMap] : CheckCircle return ( = ({ items }) => { transition={{ duration: 0.5, delay: index * 0.1 }} className="flex flex-col items-center justify-center gap-3" > -
+
- {item.text} + {item.text} ) })} diff --git a/src/blocks/UniqueValue/Component.tsx b/src/blocks/UniqueValue/Component.tsx index 785f2c4..48539e1 100644 --- a/src/blocks/UniqueValue/Component.tsx +++ b/src/blocks/UniqueValue/Component.tsx @@ -7,15 +7,15 @@ type Props = Extract[0], { blockType: 'uniqueValue' export const UniqueValueBlock: React.FC = ({ title, description }) => { return ( -
-
+
+
{title} @@ -24,7 +24,7 @@ export const UniqueValueBlock: React.FC = ({ title, description }) => { whileInView={{ opacity: 1, y: 0 }} viewport={{ once: true }} transition={{ duration: 0.6, delay: 0.2 }} - className="text-lg md:text-xl text-slate-700 leading-relaxed" + className="text-lg md:text-xl text-foreground/80 leading-relaxed" > {description}