Update marketing packages testimonials and demo

This commit is contained in:
Codex Agent
2026-01-21 12:48:34 +01:00
parent b9708d5174
commit 9b245e9c51
8 changed files with 533 additions and 160 deletions

View File

@@ -431,11 +431,33 @@ const Packages: React.FC<PackagesProps> = ({ endcustomerPackages, resellerPackag
}, [orderedResellerPackages, highlightResellerId]);
const testimonials = [
{ name: tCommon('testimonials.anna.name'), text: t('packages.testimonials.anna'), rating: 5 },
{ name: tCommon('testimonials.max.name'), text: t('packages.testimonials.max'), rating: 5 },
{ name: tCommon('testimonials.lisa.name'), text: t('packages.testimonials.lisa'), rating: 5 },
];
const testimonialsByPackage = useMemo(() => {
const raw = t('packages.testimonials', { returnObjects: true });
if (!raw || typeof raw !== 'object') {
return {};
}
return raw as Record<string, { name?: string; text?: string; rating?: number }[]>;
}, [locale, t]);
const testimonials = useMemo(() => {
if (!selectedPackage) {
return [];
}
const entries = testimonialsByPackage[selectedPackage.slug] ?? testimonialsByPackage.default ?? [];
if (!Array.isArray(entries)) {
return [];
}
return entries.map((entry) => ({
name: entry.name ?? '',
text: entry.text ?? '',
rating: entry.rating ?? 4,
}));
}, [selectedPackage, testimonialsByPackage]);
const renderDetailBody = (wrapperClass: string) => {
if (!selectedPackage) {
@@ -1104,7 +1126,7 @@ const PackageDetailGrid: React.FC<PackageDetailGridProps> = ({
</div>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
{[
{ title: t('packages.faq_free'), body: t('packages.faq_free_desc') },
{ title: t('packages.faq_branding'), body: t('packages.faq_branding_desc') },
{ title: t('packages.faq_upgrade'), body: t('packages.faq_upgrade_desc') },
{ title: t('packages.faq_reseller'), body: t('packages.faq_reseller_desc') },
{ title: t('packages.faq_payment'), body: t('packages.faq_payment_desc') },