Fix #4838 when showing avatars of deleted users

This commit is contained in:
Jamie Curnow
2025-11-05 12:33:13 +10:00
parent f35671db21
commit 0ceb7d0892
8 changed files with 14 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
const defaultImg = "/images/default-avatar.jpg";
interface Props {
url: string;
url?: string;
name?: string;
}
export function GravatarFormatter({ url, name }: Props) {
@@ -9,7 +11,7 @@ export function GravatarFormatter({ url, name }: Props) {
title={name}
className="avatar avatar-2 me-2"
style={{
backgroundImage: `url(${url})`,
backgroundImage: `url(${url || defaultImg})`,
}}
/>
</div>