mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 16:51:38 +10:00
feat: add avatar email fallback
This commit is contained in:
7
packages/lib/client-only/recipient-avatar-fallback.ts
Normal file
7
packages/lib/client-only/recipient-avatar-fallback.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { Recipient } from '@documenso/prisma/client';
|
||||
|
||||
import { initials } from './recipient-initials';
|
||||
|
||||
export const recipientAvatarFallback = (recipient: Recipient) => {
|
||||
return initials(recipient.name) || recipient.email.slice(0, 1).toUpperCase();
|
||||
};
|
||||
Reference in New Issue
Block a user