Skip to content

Commit

Permalink
Merge branches 'dev' and 'dev' of github.com:z-korp/zkube into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Matth26 committed Nov 10, 2024
2 parents 9758d3f + b0ef6fe commit d839837
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions client/src/ui/components/Balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,17 @@ const Balance = ({ address, token_address, symbol = "ETH" }: BalanceProps) => {
}
}, [isError, error]);

const symbolImage = symbolImages[symbol];

if (isError || !data) {
return (
<div className="text-xs font-semibold md:font-normal flex items-center bg-secondary">
0 {symbol}
0
{symbolImage ? (
<img src={symbolImage} alt={symbol} className="ml-2 h-8 w-8" />
) : (
<span className="ml-1">{symbol}</span>
)}
</div>
);
}
Expand All @@ -91,8 +98,6 @@ const Balance = ({ address, token_address, symbol = "ETH" }: BalanceProps) => {
// Split the balance string into characters
const balanceChars = balanceString.split("");

const symbolImage = symbolImages[symbol];

return (
<div className="text-xs font-semibold md:font-normal flex items-center bg-secondary">
{balanceChars.map((char, index) => (
Expand Down

0 comments on commit d839837

Please sign in to comment.