From f98e41d00889187c5ef0dfdaaa78a173e0ef1f64 Mon Sep 17 00:00:00 2001 From: Nenad Misic Date: Thu, 4 Jan 2024 18:42:21 +0100 Subject: [PATCH] Use `defaultLogo` in `onError` in Leaderboard row image (#2627) * 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 ab8cb0b6f012f9781b4a1246bff302fccbf0664b. --- src/pages/Leaderboard/Table/Row/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/Leaderboard/Table/Row/index.tsx b/src/pages/Leaderboard/Table/Row/index.tsx index a097c80016..f2de059538 100644 --- a/src/pages/Leaderboard/Table/Row/index.tsx +++ b/src/pages/Leaderboard/Table/Row/index.tsx @@ -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, @@ -20,7 +19,7 @@ export default function Row({ 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" />