fix: no update grid if tab not changed

pull/10/head
VPcodebase 3 years ago
parent d4cb8b8d8f
commit 65a8cd00cf
  1. 14
      .env
  2. 13
      src/pages/TransactionPage/index.tsx

14
.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/

@ -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);
}
}}
>
<Tab title={<Text size="small">Transaction Details</Text>}>

Loading…
Cancel
Save