"use client" import { useTranslation } from 'react-i18next'; import { motion } from "framer-motion"; import { Code2, ShoppingBag, TrendingUp } from "lucide-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../../components/Card"; import { Badge } from "../../../components/Badge"; // Definiere den Typ für einen Expertise-Bereich interface ExpertiseArea { title: string; description: string; skills: string[]; } // Typisierung für iconMap: Wir erwarten ein React-Komponenten-Typ, der optional eine className erhält const iconMap: Record> = { 'ERP Integration': ShoppingBag, 'Entwicklung': Code2, 'E-Commerce': ShoppingBag, 'Digitales Marketing': TrendingUp, // English mappings 'Development': Code2, 'Digital Marketing': TrendingUp }; const Expertise = () => { const { t } = useTranslation('home'); // Wir casten den Rückgabewert explizit zu ExpertiseArea[] const expertiseAreas = t('expertise.areas', { returnObjects: true }) as ExpertiseArea[]; return (
{t('expertise.title')}
{expertiseAreas.map((area: ExpertiseArea, index: number) => { const Icon = iconMap[area.title] || ShoppingBag; return (
{area.title}
{area.description}
{area.skills.map((skill: string, skillIndex: number) => ( {skill} ))}
); })}
); }; export default Expertise;