import { MessageCircle } from 'lucide-react'; import { useStorefront } from './context'; import { storefrontText } from './text'; export function whatsappLink(number: string, text: string): string { return `https://wa.me/${number}?text=${encodeURIComponent(text)}`; } /** * A round "chat on WhatsApp" button in the corner of every store page. * Shows only when the merchant has set a WhatsApp number. */ export function WhatsAppButton() { const { shop, language, storeName } = useStorefront(); const t = storefrontText(language); if (!shop.whatsapp) { return null; } return ( ); }