Skip to content

Commit

Permalink
Use defaultLogo in onError in Leaderboard row image (#2627)
Browse files Browse the repository at this point in the history
* Use defaultLogo onError in Leaderboard row img

* Pass all Image.props to nested img element

* Revert "Pass all Image.props to nested img element"

This reverts commit ab8cb0b.
  • Loading branch information
Nenad Misic authored Jan 4, 2024
1 parent e3c4ffd commit f98e41d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/Leaderboard/Table/Row/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { appRoutes } from "constants/routes";
import Amount from "./Amount";
import projectFunds from "./projectFunds";

const defaultIcon = "/images/angelprotocol-horiz-blu.png";
export default function Row({
total_liq,
total_lock,
Expand All @@ -20,7 +19,7 @@ export default function Row({
<Cells type="td" cellClass="first:pl-4 last:pr-4 py-3">
<Image
src={charity_logo || defaultLogo}
onError={(e) => e.currentTarget.setAttribute("src", defaultIcon)}
onError={(e) => e.currentTarget.setAttribute("src", defaultLogo)}
loading="lazy"
className="h-16 aspect-video rounded border border-gray-l3 dark:border-none dark:bg-white p-2"
/>
Expand Down

0 comments on commit f98e41d

Please sign in to comment.