From 9879290a38fb29994691770d60852086726d95ae Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sun, 31 Oct 2021 19:59:14 -0300 Subject: [PATCH] Add symbol support --- src/components/TokenName.tsx | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/components/TokenName.tsx b/src/components/TokenName.tsx index f57dd07..0553d4a 100644 --- a/src/components/TokenName.tsx +++ b/src/components/TokenName.tsx @@ -6,6 +6,7 @@ import { TokenMeta } from "../types"; type TokenNameProps = { name: string; + symbol: string; address: string; linkable: boolean; dontOverrideColors?: boolean; @@ -13,6 +14,7 @@ type TokenNameProps = { const TokenName: React.FC = ({ name, + symbol, address, linkable, dontOverrideColors, @@ -24,9 +26,14 @@ const TokenName: React.FC = ({ dontOverrideColors ? "" : "text-link-blue hover:text-link-blue-hover" } truncate`} to={`/address/${address}`} - title={`${name}: ${address}`} + title={`${name} (${symbol}): ${address}`} > - + ); } @@ -34,9 +41,9 @@ const TokenName: React.FC = ({ return (
- +
); }; @@ -45,14 +52,22 @@ type ContentProps = { address: string; linkable: boolean; name: string; + symbol: string; }; -const Content: React.FC = ({ address, linkable, name }) => ( +const Content: React.FC = ({ + address, + linkable, + name, + symbol, +}) => ( <>
- {name} + + {name} ({symbol}) + ); @@ -65,6 +80,7 @@ export const tokenRenderer: ResolvedAddressRenderer = (