From d5421266f5a92e76982203a9a6f9bc6dedf92325 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Wed, 3 Jun 2020 18:40:30 +0800 Subject: [PATCH] Reorder TopAccountsCard.tsx --- explorer/src/components/TopAccountsCard.tsx | 68 ++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/explorer/src/components/TopAccountsCard.tsx b/explorer/src/components/TopAccountsCard.tsx index a110fda47a..6618b8c36b 100644 --- a/explorer/src/components/TopAccountsCard.tsx +++ b/explorer/src/components/TopAccountsCard.tsx @@ -107,6 +107,39 @@ export default function TopAccountsCard() { ); } +const renderAccountRow = ( + account: AccountBalancePair, + index: number, + supply: number +) => { + const base58AccountPubkey = account.address.toBase58(); + return ( + + + {index + 1} + + + + {base58AccountPubkey} + + + {lamportsToSolString(account.lamports, 0)} + {`${((100 * account.lamports) / supply).toFixed(3)}%`} + + ({ + ...location, + pathname: "/account/" + base58AccountPubkey + })} + className="btn btn-rounded-circle btn-white btn-sm" + > + + + + + ); +}; + const useQueryFilter = (): Filter => { const query = useQuery(); const filter = query.get("filter"); @@ -156,7 +189,7 @@ const FilterDropdown = ({ filter, toggle, show }: DropdownProps) => { }; }; - const FILTERS: Filter[] = [null, "nonCirculating", "all"]; + const FILTERS: Filter[] = ["all", null, "nonCirculating"]; return (
); }; - -const renderAccountRow = ( - account: AccountBalancePair, - index: number, - supply: number -) => { - const base58AccountPubkey = account.address.toBase58(); - return ( - - - {index + 1} - - - - {base58AccountPubkey} - - - {lamportsToSolString(account.lamports, 0)} - {`${((100 * account.lamports) / supply).toFixed(3)}%`} - - ({ - ...location, - pathname: "/account/" + base58AccountPubkey - })} - className="btn btn-rounded-circle btn-white btn-sm" - > - - - - - ); -};