feat(WEB-162): final design for my profile page

This commit is contained in:
Simon Emanuelsson
2024-06-07 10:36:23 +02:00
committed by Christel Westerberg
parent a7b04df7b6
commit 5f3e417593
96 changed files with 802 additions and 494 deletions

15
utils/maskValue.ts Normal file
View File

@@ -0,0 +1,15 @@
const emailRegex =
/(?<=.)[^@\n](?=[^@\n]*?@)|(?:(?<=@.+)|(?!^)\G(?=[^@\n]*$)).(?=.*\.)/gm
export function email(str: string) {
return str.replace(emailRegex, "*")
}
const phoneRegex = /.(?!.{0,1}$)/gm
export function phone(str: string) {
return str.replace(phoneRegex, "*")
}
const textRegex = /(?!^)./gm
export function text(str: string) {
return str.replace(textRegex, "*")
}