Use only alphabet in generated avatar
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user