From 65a8cd00cfc992eb32482d38ce7327c34706118b Mon Sep 17 00:00:00 2001 From: VPcodebase Date: Mon, 5 Jul 2021 14:47:52 +0300 Subject: [PATCH] fix: no update grid if tab not changed --- .env | 14 +++++++------- src/pages/TransactionPage/index.tsx | 13 +++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.env b/.env index bcc643b..dfb3fd0 100644 --- a/.env +++ b/.env @@ -1,9 +1,9 @@ -REACT_APP_RPC_URL_SHARD0=http://internal.s0.t.hmny.io -REACT_APP_RPC_URL_SHARD1=https://api.s1.t.hmny.io -REACT_APP_RPC_URL_SHARD2=https://api.s2.t.hmny.io -REACT_APP_RPC_URL_SHARD3=https://api.s3.t.hmny.io +REACT_APP_RPC_URL_SHARD0=https://a.api.s0.t.hmny.io/ +REACT_APP_RPC_URL_SHARD1=https://api.s1.t.hmny.io/ +REACT_APP_RPC_URL_SHARD2=https://api.s2.t.hmny.io/ +REACT_APP_RPC_URL_SHARD3=https://api.s3.t.hmny.io/ REACT_APP_AVAILABLE_SHARDS=0,1,2,3 -REACT_APP_EXPLORER_V1_API_URL=https://explorer.pops.one:8888 +REACT_APP_EXPLORER_V1_API_URL=https://explorer.pops.one:8888/ REACT_APP_INDEXER_IPFS_GATEWAY=https://ipfs.io/ipfs/ -REACT_APP_PROD_ADDRESS=https://explorer-v2-api.hmny.io -#REACT_APP_DEV_ADDRESS=https://ws.explorer-v2.hmny.io +REACT_APP_PROD_ADDRESS=https://explorer-v2-api.hmny.io/ +REACT_APP_DEV_ADDRESS=https://ws.explorer-v2.hmny.io/ diff --git a/src/pages/TransactionPage/index.tsx b/src/pages/TransactionPage/index.tsx index 31f2ddf..6d0ba68 100644 --- a/src/pages/TransactionPage/index.tsx +++ b/src/pages/TransactionPage/index.tsx @@ -38,7 +38,7 @@ export const TransactionPage = () => { } catch { activeTab = 0; } - + // hash or number // @ts-ignore const { id } = useParams(); @@ -168,11 +168,12 @@ export const TransactionPage = () => { justify="start" activeIndex={activeIndex} onActive={(newActive) => { - history.replace( - `${history.location.pathname}?activeTab=${newActive}` - ); - console.log(history); - setActiveIndex(newActive); + if (newActive !== activeIndex) { + history.replace( + `${history.location.pathname}?activeTab=${newActive}` + ); + setActiveIndex(newActive); + } }} > Transaction Details}>