diff --git a/web/src/components/ShopDetailsTab.tsx b/web/src/components/ShopDetailsTab.tsx index 41df0fd..3f1148c 100644 --- a/web/src/components/ShopDetailsTab.tsx +++ b/web/src/components/ShopDetailsTab.tsx @@ -99,30 +99,30 @@ export const ShopDetailsTab = ({ shop }: { shop: BarberShop }) => {

Contacto

{contacts.phone1 && ( -
+
-
+
- {contacts.phone1} + {contacts.phone1}
- -
+
+ +
+
)} {contacts.phone2 && ( -
+
-
+
- {contacts.phone2} + {contacts.phone2}
- -
+
+ +
+
)}
diff --git a/web/src/pages/Dashboard.tsx b/web/src/pages/Dashboard.tsx index d443f70..07ef711 100644 --- a/web/src/pages/Dashboard.tsx +++ b/web/src/pages/Dashboard.tsx @@ -1107,15 +1107,25 @@ function DashboardInner({ shop }: { shop: BarberShop }) {
setEditContacts({ ...editContacts, phone1: e.target.value })} - placeholder="Ex: 910 000 000" + onChange={(e) => { + const val = e.target.value.replace(/\D/g, '').slice(0, 9); + setEditContacts({ ...editContacts, phone1: val }); + }} + placeholder="Ex: 910000000" /> setEditContacts({ ...editContacts, phone2: e.target.value })} - placeholder="Ex: 252 000 000" + onChange={(e) => { + const val = e.target.value.replace(/\D/g, '').slice(0, 9); + setEditContacts({ ...editContacts, phone2: val }); + }} + placeholder="Ex: 252000000" />