import { Helmet } from 'react-helmet-async'; interface SEOHeadProps { title?: string; description?: string; image?: string; url?: string; type?: 'website' | 'product' | 'article'; product?: { price?: string; currency?: string; availability?: 'in stock' | 'out of stock'; }; } /** * SEOHead Component * Adds dynamic meta tags for social media sharing (Open Graph, Twitter Cards) * Used for link previews on Facebook, Twitter, Slack, etc. */ export function SEOHead({ title, description, image, url, type = 'website', product, }: SEOHeadProps) { const config = (window as any).woonoowCustomer; const siteName = config?.siteName || 'Store'; const siteUrl = config?.siteUrl || ''; const fullTitle = title ? `${title} | ${siteName}` : siteName; const fullUrl = url || (typeof window !== 'undefined' ? window.location.href : ''); return ( {/* Basic Meta Tags */} {fullTitle} {description && } {/* Open Graph (Facebook, LinkedIn, etc.) */} {description && } {image && } {/* Twitter Card */} {description && } {image && } {/* Product-specific meta tags */} {type === 'product' && product && ( <> )} ); } export default SEOHead;