mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-02-09 05:25:15 -05:00
9 lines
368 B
TypeScript
9 lines
368 B
TypeScript
import { PlayerFragmentFragment } from '../graphql/autogen/types';
|
|
|
|
export const getPlayerImage = (player: PlayerFragmentFragment): string =>
|
|
player.box_profile?.imageUrl ||
|
|
`https://avatars.dicebear.com/api/jdenticon/${player.username}.svg`;
|
|
|
|
export const getPlayerName = (player: PlayerFragmentFragment): string =>
|
|
player.box_profile?.name || player.username;
|