import { useTranslation } from 'react-i18next'; import { getLocalizedField } from '../utils/localization'; interface DynamicQuoteCalloutProps { payload: any; } export default function DynamicQuoteCallout({ payload }: DynamicQuoteCalloutProps) { const { i18n } = useTranslation(); const lang = i18n.language; const p = payload || {}; const quote = getLocalizedField(p.quote, lang); const author = getLocalizedField(p.author, lang); const role = getLocalizedField(p.role, lang); return (
"{quote || 'Fragrance is the invisible, unforgettable, ultimate accessory of fashion.'}"
{(author || role) && (
{author && {author}} {role && {role}}
)}
); }