mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
12 lines
271 B
TypeScript
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',
|
|
});
|