We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 952cd00 commit 449d83bCopy full SHA for 449d83b
general.ts
@@ -186,11 +186,12 @@ export function objectIsEmpty(obj: any): boolean {
186
return true;
187
}
188
189
-export function getUserAvatarUri(user) {
+export function getUserAvatarUri(user, prefix?: string) {
190
let avatarId = 0;
191
if (user && user.firstName && user.lastName) {
192
avatarId = (user.firstName[0].charCodeAt(0) + user.lastName[0].charCodeAt(0)) % 5;
193
194
+ if (prefix) return prefix + avatarId + ".png";
195
return avatarId + ".png";
196
197
0 commit comments