Phone number showed with dot

This commit is contained in:
Vins 2024-05-21 10:08:06 +02:00
parent 990d65ef49
commit 274c285aa8
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "PORT=5005 next dev",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",

View File

@ -101,10 +101,11 @@ export default class UserFolderHeader extends React.Component<IProps, IState> {
return phoneNumber;
}
const output = phoneNumber.split("").map((char, index) => {
if (index % 2) return char + " ";
if (index % 2) return char + ".";
return char;
});
return output.join("");
const joinedOutput = output.join("");
return joinedOutput.substring(0, joinedOutput.length - 1);
}
private onEditClick(): void {}