From 049f49ebe8724037212444736dff4bb9de75b74b Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 22 Jan 2023 09:46:52 -0500 Subject: [PATCH] fix: Fallback to initials instead of placeholder when offline --- app/components/Avatar/Avatar.tsx | 5 ++--- app/components/Avatar/placeholder.png | Bin 564 -> 0 bytes 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 app/components/Avatar/placeholder.png diff --git a/app/components/Avatar/Avatar.tsx b/app/components/Avatar/Avatar.tsx index 095dc30de..b42f5fe4a 100644 --- a/app/components/Avatar/Avatar.tsx +++ b/app/components/Avatar/Avatar.tsx @@ -2,7 +2,6 @@ import * as React from "react"; import styled from "styled-components"; import useBoolean from "~/hooks/useBoolean"; import Initials from "./Initials"; -import placeholder from "./placeholder.png"; export interface IAvatar { avatarUrl: string | null; @@ -29,10 +28,10 @@ function Avatar(props: Props) { return ( - {src ? ( + {src && !error ? ( diff --git a/app/components/Avatar/placeholder.png b/app/components/Avatar/placeholder.png deleted file mode 100644 index 315a63760cb2420c5d354b4399ff19f28094fa4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 564 zcmV-40?Yl0P)6(%c0;5gdd%rcwdx0MA$D83V@$pwrDdJ04}~Tb3VwL2(z$- z0Yr8i;i>dvTPZ-cunyG{%@aZZOhl?hAIbojO;w9NlmW0LP%ZjU2Ee*Twdg}@fRA>^ zOri8HV(qt4?Gu^yr9>)8O^hiJ08_h+3@clV$*b(>17LlUR57;y@qPmk^sfj#)^P6t0000