import React from 'react'; import { Head, Link, useForm, usePage } from '@inertiajs/react'; import { useTranslation } from 'react-i18next'; import MarketingLayout from '@/layouts/marketing/MarketingLayout'; interface Package { id: number; name: string; description: string; price: number; } interface Props { packages: Package[]; } const Home: React.FC = ({ packages }) => { const { t } = useTranslation('marketing'); const { data, setData, post, processing, errors, reset } = useForm({ name: '', email: '', message: '', }); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); post('/kontakt', { onSuccess: () => reset(), }); }; React.useEffect(() => { if (Object.keys(errors).length > 0) { window.scrollTo({ top: 0, behavior: 'smooth' }); } }, [errors]); return ( {/* Hero Section */}

{t('home.hero_title')}

{t('home.hero_description')}

{t('home.cta_explore')}
{t('home.hero_image_alt')}
{/* How it Works Section */}

{t('home.how_title')}

1

{t('home.step1_title')}

{t('home.step1_desc')}

2

{t('home.step2_title')}

{t('home.step2_desc')}

3

{t('home.step3_title')}

{t('home.step3_desc')}

{/* Features Section */}

{t('home.features_title')}

{t('home.feature1_title')}

{t('home.feature1_desc')}

{t('home.feature2_title')}

{t('home.feature2_desc')}

{t('home.feature3_title')}

{t('home.feature3_desc')}

{/* Packages Teaser */}

{t('home.packages_title')}

{packages.slice(0, 2).map((pkg) => (

{pkg.name}

{pkg.description}

{pkg.price} {t('common.currency.euro')}

{t('home.view_details')}
))}
{t('home.all_packages')}
{/* Contact Section */}

{t('home.contact_title')}

setData('name', e.target.value)} className="w-full p-3 border rounded-lg" /> {errors.name &&

{errors.name}

}
setData('email', e.target.value)} className="w-full p-3 border rounded-lg" /> {errors.email &&

{errors.email}

}