|
|
@ -15,7 +15,22 @@ function UserHeader({ name, fone }) { |
|
|
|
const index = utils.hashPhoneNumber(fone) % assets.avatar.length || 2 |
|
|
|
const Avatar = assets.avatar[index]; |
|
|
|
|
|
|
|
const _mask = fone?.length >= 12 ? "(999) 99999-9999" : "(99) 99999-9999"; |
|
|
|
var _mask = ""; |
|
|
|
switch (fone?.length) { |
|
|
|
case 12: |
|
|
|
_mask = "(999) 99999-9999" ; |
|
|
|
break; |
|
|
|
case 11: |
|
|
|
_mask = "(99) 99999-9999" |
|
|
|
break; |
|
|
|
case 10: |
|
|
|
_mask = "(99) 9999-9999" |
|
|
|
break; |
|
|
|
default: |
|
|
|
_mask = "(99) 9999-9999" |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
const fone_mask = mask(fone, _mask); |
|
|
|
|
|
|
|
return ( |
|
|
|