Files
botsmann/components/shared/sections/HowItWorksSection.tsx
T
g-butandClaude Opus 4.5 4600019eb3 refactor(bots): config-driven bot pages architecture
Replace individual static bot pages with a single dynamic [slug]/page.tsx
that renders from centralized configuration. This makes adding new bots
a matter of editing config files only - no new page files needed.

Architecture changes:
- Add lib/config/bot-pages.ts as SSOT for all bot page content
- Add components/shared/sections/ with generic section components
- Add app/bots/[slug]/page.tsx as single dynamic page
- Remove 100+ files from individual bot directories

New section components:
- DisclaimerSection, FeaturesSection, HowItWorksSection
- BenefitsSection, TestimonialsSection, VisionSection
- TechnologySection, CTASection, DemoSectionWrapper

To add a new bot now:
1. Add entry to lib/config/bot-pages.ts (sections + content)
2. Add hero config to data/botHeroConfigs.ts
3. Add demo config to lib/demo/botDemoConfigs.ts
4. Add basic info to data/bots.ts
Done - no new page.tsx files needed!

Files deleted: ~100+ (bot-specific pages/components)
Files added: 11 (config + generic sections)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:57:33 +01:00

44 lines
1.5 KiB
TypeScript

'use client';
import type { HowItWorksContent } from '@/lib/config/bot-pages';
import type { BotAccentColor } from '@/types/bot';
import { getAccentClasses } from '@/lib/config/colors';
interface HowItWorksSectionProps {
content: HowItWorksContent;
accentColor: BotAccentColor;
}
export function HowItWorksSection({ content, accentColor }: HowItWorksSectionProps) {
const { title, subtitle, steps } = content;
const accent = getAccentClasses(accentColor);
return (
<div className="max-w-4xl mx-auto">
<h2 className="text-3xl font-bold text-center text-gray-900 mb-4">{title}</h2>
{subtitle && (
<p className="text-lg text-gray-600 text-center max-w-2xl mx-auto mb-12">{subtitle}</p>
)}
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
{steps.map((step, index) => (
<div key={index} className="text-center">
<div
className={`w-16 h-16 mx-auto mb-4 rounded-full flex items-center justify-center ${accent.lightBg}`}
>
{step.icon ? (
<span className="text-2xl">{step.icon}</span>
) : (
<span className={`text-xl font-bold ${accent.text}`}>{step.number ?? index + 1}</span>
)}
</div>
<h3 className="font-semibold text-gray-900 mb-2">{step.title}</h3>
<p className="text-gray-600 text-sm">{step.description}</p>
</div>
))}
</div>
</div>
);
}