refactor: use css theme variables, enforce strict typing without any and remove dead Hero component

This commit is contained in:
MichalC
2026-08-31 23:14:11 +02:00
parent 0a1e74dbe4
commit c2b3e6a616
10 changed files with 50 additions and 55 deletions
+6 -6
View File
@@ -8,7 +8,7 @@ type Props = Extract<NonNullable<Page['layout']>[0], { blockType: 'process' }>
export const ProcessBlock: React.FC<Props> = ({ title, steps, ctaText }) => {
return (
<section className="py-24 bg-slate-900 text-white">
<section className="py-24 bg-background text-foreground">
<div className="container mx-auto px-4">
<motion.h2
initial={{ opacity: 0, y: 20 }}
@@ -22,9 +22,9 @@ export const ProcessBlock: React.FC<Props> = ({ title, steps, ctaText }) => {
<div className="max-w-4xl mx-auto">
<div className="flex flex-col md:flex-row gap-8 relative">
{/* Linia łącząca na desktopie */}
<div className="hidden md:block absolute top-6 left-[10%] right-[10%] h-0.5 bg-slate-800 z-0" />
<div className="hidden md:block absolute top-6 left-[10%] right-[10%] h-0.5 bg-border z-0" />
{steps?.map((step: any, index: number) => (
{steps?.map((step: NonNullable<Props['steps']>[0], index: number) => (
<motion.div
key={step.id || index}
initial={{ opacity: 0, y: 20 }}
@@ -33,11 +33,11 @@ export const ProcessBlock: React.FC<Props> = ({ 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"
>
<div className="w-12 h-12 rounded-full bg-blue-600 border-4 border-slate-900 flex items-center justify-center text-xl font-bold mb-6">
<div className="w-12 h-12 rounded-full bg-accent text-white border-4 border-background flex items-center justify-center text-xl font-bold mb-6">
{index + 1}
</div>
<h3 className="text-xl font-bold mb-3">{step.title}</h3>
<p className="text-slate-400 text-center md:text-left">{step.description}</p>
<p className="text-foreground/80 text-center md:text-left">{step.description}</p>
</motion.div>
))}
</div>
@@ -50,7 +50,7 @@ export const ProcessBlock: React.FC<Props> = ({ title, steps, ctaText }) => {
transition={{ duration: 0.5, delay: 0.6 }}
className="mt-16 text-center"
>
<Link href="/jak-to-dziala" className="inline-block px-8 py-4 border-2 border-slate-700 hover:border-slate-500 rounded-lg text-white font-semibold transition-colors">
<Link href="/jak-to-dziala" className="inline-block px-8 py-4 border-2 border-border hover:border-foreground rounded-lg text-foreground font-semibold transition-colors">
{ctaText}
</Link>
</motion.div>