1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/util/generateImageUrl.ts
2022-11-10 12:13:45 +01:00

12 lines
271 B
TypeScript

import gravatarUrl from 'gravatar-url';
export const generateImageUrl = (user: {
email: string;
username: string;
id: number;
}): string =>
gravatarUrl(user.email || user.username || String(user.id), {
size: 42,
default: 'retro',
});