import { Link } from 'react-router-dom'; import type { HeroSectionPayload } from '@homaroma/types'; interface DynamicHeroProps { payload: HeroSectionPayload; } export default function DynamicHero({ payload }: DynamicHeroProps) { const { tagline, title, description, imageUrl, buttonText, buttonLink } = payload; const renderTitle = (text: string) => { if (!text) return null; return text.split('[').map((part, i) => { if (part.includes(']')) { const [accent, rest] = part.split(']'); return ( {accent} {rest} ); } return {part}; }); }; return (
Hero Background { (e.target as HTMLImageElement).style.display = 'none'; }} /> {/* Dark gradient overlay for premium vibe */}

{tagline || "Vibrant Elegance Collection"}

{renderTitle(title) || ( <> Inhale Serenity )}

{description}

{buttonText || "Explore Collection"} Learn More →
); }