const { Button: OButton, Field: OField, Input: OInput, Textarea: OTextarea } = window.LeVaultDesignSystem_1c8a5e; function OrderForm({ order, set }) { const [touched, setTouched] = React.useState(false); const missing = { initials: !order.initials, name: !order.name.trim(), phone: !order.phone.trim(), address: !order.address.trim() }; const ready = !Object.values(missing).some(Boolean); const submit = e => { e.preventDefault(); if (!ready) { setTouched(true); return; } window.open(waLink(order), "_blank", "noopener"); }; const err = k => (touched && missing[k]); return ( set({ name: e.target.value })} /> set({ phone: e.target.value })} /> set({ address: e.target.value })} /> set({ notes: e.target.value })} /> {touched && missing.initials ? ( Set your initials in the section above first. ) : null} Send order to WhatsApp Opens WhatsApp with your case, monogram and {priceOf(order.currency)} already written. ); } function Foot() { return ( ); } Object.assign(window, { OrderForm, Foot });
Set your initials in the section above first.
Opens WhatsApp with your case, monogram and {priceOf(order.currency)} already written.