fix: Fallback to initials instead of placeholder when offline

This commit is contained in:
Tom Moor
2023-01-22 09:46:52 -05:00
parent f1406577b7
commit 049f49ebe8
2 changed files with 2 additions and 3 deletions

View File

@@ -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 (
<Relative>
{src ? (
{src && !error ? (
<CircleImg
onError={handleError}
src={error ? placeholder : src}
src={src}
$showBorder={showBorder}
{...rest}
/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B