diff --git a/src/app/screens/AccountScreen.js b/src/app/screens/AccountScreen.js index a3678fe..4bc6ceb 100644 --- a/src/app/screens/AccountScreen.js +++ b/src/app/screens/AccountScreen.js @@ -9,17 +9,21 @@ import { MaterialCommunityIcons } from "@expo/vector-icons"; import colors from "../config/colors"; import ConfirmationModal from "../components/ConfirmationModal"; import utils from "../config/utils"; +import { mask } from "react-native-mask-text"; 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"; + const fone_mask = mask(fone, _mask); return ( {name} - {fone} + {fone ? fone_mask : ""} );