feat: phone input formatting in CreateSessionModal and Input component

This commit is contained in:
2025-06-25 15:43:16 +05:00
parent 6ea1e84414
commit ee837e5930
6 changed files with 3537 additions and 19 deletions
+2 -1
View File
@@ -80,7 +80,7 @@ export default function CreateSessionModal({ targetServerId, client }: Props) {
.post("clients", {
json: {
name,
phone,
phone: phone?.replace(/\D/g, ""),
email,
},
})
@@ -208,6 +208,7 @@ export default function CreateSessionModal({ targetServerId, client }: Props) {
value={phone || ""}
onChange={(e) => setPhone(e.target.value)}
placeholder="Номер телефона"
mask="+7 (999) 999-99-99"
required
isLoading={isLoading}
/>