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_SHARD0=https://a.api.s0.t.hmny.io/
REACT_APP_RPC_URL_SHARD1=https://api.s1.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_SHARD2=https://api.s2.t.hmny.io/
REACT_APP_RPC_URL_SHARD3=https://api.s3.t.hmny.io REACT_APP_RPC_URL_SHARD3=https://api.s3.t.hmny.io/
REACT_APP_AVAILABLE_SHARDS=0,1,2,3 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_INDEXER_IPFS_GATEWAY=https://ipfs.io/ipfs/
REACT_APP_PROD_ADDRESS=https://explorer-v2-api.hmny.io REACT_APP_PROD_ADDRESS=https://explorer-v2-api.hmny.io/
#REACT_APP_DEV_ADDRESS=https://ws.explorer-v2.hmny.io REACT_APP_DEV_ADDRESS=https://ws.explorer-v2.hmny.io/

@ -38,7 +38,7 @@ export const TransactionPage = () => {
} catch { } catch {
activeTab = 0; activeTab = 0;
} }
// hash or number // hash or number
// @ts-ignore // @ts-ignore
const { id } = useParams(); const { id } = useParams();
@ -168,11 +168,12 @@ export const TransactionPage = () => {
justify="start" justify="start"
activeIndex={activeIndex} activeIndex={activeIndex}
onActive={(newActive) => { onActive={(newActive) => {
history.replace( if (newActive !== activeIndex) {
`${history.location.pathname}?activeTab=${newActive}` history.replace(
); `${history.location.pathname}?activeTab=${newActive}`
console.log(history); );
setActiveIndex(newActive); setActiveIndex(newActive);
}
}} }}
> >
<Tab title={<Text size="small">Transaction Details</Text>}> <Tab title={<Text size="small">Transaction Details</Text>}>

Loading…
Cancel
Save