'use client'; import Scribble from '@/components/Scribble'; import { Button, Container, Heading, Section } from '@/components/ui'; import { useTranslations, useLocale } from 'next-intl'; import dynamic from 'next/dynamic'; import { useAnalytics } from '../analytics/useAnalytics'; import { AnalyticsEvents } from '../analytics/analytics-events'; const HeroIllustration = dynamic(() => import('./HeroIllustration'), { ssr: false }); export default function Hero({ data }: { data?: any }) { const t = useTranslations('Home.hero'); const locale = useLocale(); const { trackEvent } = useAnalytics(); return (
{data?.title ? ( <> {data.title.split(/(.*?<\/green>)/g).map((part: string, i: number) => { if (part.startsWith('') && part.endsWith('')) { const content = part.replace(/<\/?green>/g, ''); return ( {content}
); } return {part}; })} ) : ( t.rich('title', { green: (chunks) => ( {chunks}
), }) )}

{data?.subtitle || t('subtitle')}

); }