Use only alphabet in generated avatar

zio/stable
Paul Frazee 2022-11-14 15:58:21 -06:00
parent 9170040acb
commit d7c6fbe11d
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ export function UserAvatar({
function getInitials(str: string): string {
const tokens = str
.toLowerCase()
.replace(/[^a-z]/g, '')
.split(' ')
.filter(Boolean)
.map(v => v.trim())