From 700c059cb1cf88f2af911410948c5f57afb8f82f Mon Sep 17 00:00:00 2001 From: Keith Date: Wed, 25 Sep 2019 15:50:55 +0800 Subject: [PATCH] fix(neuron-ui): hide unrelated columns when the mainnet address is displayed --- packages/neuron-ui/src/components/Addresses/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/neuron-ui/src/components/Addresses/index.tsx b/packages/neuron-ui/src/components/Addresses/index.tsx index 1de521fd24..c9fd44598d 100644 --- a/packages/neuron-ui/src/components/Addresses/index.tsx +++ b/packages/neuron-ui/src/components/Addresses/index.tsx @@ -189,7 +189,9 @@ const Addresses = ({ ({ ...col, name: t(col.name) }))} + columns={addressColumns + .filter(col => !showMainnetAddress || col.key === 'address') + .map(col => ({ ...col, name: t(col.name) }))} items={addresses.map(addr => ({ ...addr, address: showMainnetAddress