'use client' import { useState } from 'react' import { useI18n } from '@/lib/i18n' import UnlockModal from './UnlockModal' export default function InfoBox() { const { t } = useI18n() const [showUnlockModal, setShowUnlockModal] = useState(false) // Process the text to make "referral link" clickable const processTaxesLegalText = () => { const text = t('infoBox.taxesLegalText') // Replace "referral link" or "Referral-Link" with a clickable link // Preserve the original case of the matched text const processed = text.replace( /(referral link|Referral-Link)/gi, (match) => `${match}` ) return processed } return ( <>
{t('infoBox.whyCheapText')}
{ const target = e.target as HTMLElement if (target.classList.contains('referral-link-clickable')) { e.preventDefault() setShowUnlockModal(true) } }} />
{t('infoBox.dropModelText')}