diff --git a/src/components/Atoms/Address/Address.tsx b/src/components/Atoms/Address/Address.tsx index cf3c88e2..a629111f 100644 --- a/src/components/Atoms/Address/Address.tsx +++ b/src/components/Atoms/Address/Address.tsx @@ -22,8 +22,9 @@ export const Address: React.FC = ({ }; return ( -
-

{truncate(address)}

+

+ {truncate(address)} + {show_copy_icon ? (

+

); }; diff --git a/src/components/Organisms/AddressActivityListView/AddressActivityListView.tsx b/src/components/Organisms/AddressActivityListView/AddressActivityListView.tsx index ace766c8..500f39cb 100644 --- a/src/components/Organisms/AddressActivityListView/AddressActivityListView.tsx +++ b/src/components/Organisms/AddressActivityListView/AddressActivityListView.tsx @@ -46,64 +46,54 @@ export const AddressActivityListView: React.FC< const columns: ColumnDef[] = [ { accessorKey: "label", + id: "label", header: ({ column }) => ( - align="left" - header_name={"Name"} + header="Chain Name" column={column} /> ), - cell: ({ row }) => { - return ( -
- - {row.getValue("label")} -
- ); - }, + cell: ({ row }) => ( +
+ + {row.getValue("label")} +
+ ), }, { accessorKey: "last_seen_at", + id: "last_seen_at", header: ({ column }) => ( - align="left" - header_name={"Last Active"} + header="Last Active" column={column} /> ), - cell: ({ row }) => { - const t = (row.getValue("last_seen_at") as string).toString(); - - return
{timestampParser(t, "relative")}
; - }, + cell: ({ row }) => + timestampParser(row.getValue("last_seen_at"), "relative"), }, { accessorKey: "is_testnet", + id: "is_testnet", header: ({ column }) => ( - align="center" - header_name={"Mainnet"} + header="Mainnet" column={column} /> ), - - cell: ({ row }) => { - const t = row.getValue("is_testnet"); - - return ( -
- {t ? ( - "" - ) : ( - - )} -
- ); - }, + cell: ({ row }) => + !row.getValue("is_testnet") ? ( + + ) : ( + <> + ), }, ]; diff --git a/src/components/Organisms/TokenBalancesListView/TokenBalancesListView.tsx b/src/components/Organisms/TokenBalancesListView/TokenBalancesListView.tsx index 208bf8f9..16b66fd4 100644 --- a/src/components/Organisms/TokenBalancesListView/TokenBalancesListView.tsx +++ b/src/components/Organisms/TokenBalancesListView/TokenBalancesListView.tsx @@ -46,18 +46,6 @@ export const TokenBalancesListView: React.FC = ({ const [errorMessage, setErrorMessage] = useState(null); const [filterResult, setFilterResult] = useState>(None); - const [windowWidth, setWindowWidth] = useState(0); - - useEffect(() => { - setWindowWidth(window.innerWidth); - const handleResize = () => { - setWindowWidth(window.innerWidth); - }; - window.addEventListener("resize", handleResize); - return () => { - window.removeEventListener("resize", handleResize); - }; - }, []); useEffect(() => { (async () => { @@ -115,35 +103,28 @@ export const TokenBalancesListView: React.FC = ({ id: "contract_name", accessorKey: "contract_name", header: ({ column }) => ( -
- -
+ + align="left" + header={"Token"} + column={column} + /> ), cell: ({ row }) => { const chain: ChainItem | null = chains?.find((o) => o.name === row.original.chain) ?? null; const chainColor = chain?.color_theme.hex; - const chain_label = (chain?.label ? chain.label : "").replace( - " Mainnet", - "" - ); - const protocol_url = row.original.logo_urls.protocol_logo_url; return ( -
+
- {chain_label} + {chain?.label.replace(" Mainnet", "")}