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 0eb301d commit 1f58e0fCopy full SHA for 1f58e0f
general.ts
@@ -184,4 +184,12 @@ export function objectIsEmpty(obj: any): boolean {
184
if (!obj) return true;
185
for (var i in obj) return false;
186
return true;
187
+}
188
+
189
+export function getUserAvatarUri(user) {
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
+ return avatarId + ".png";
195
}
0 commit comments