fix(explorer): avoid caching block list, cache block by id (#2238)
This commit is contained in:
parent
8489d50024
commit
d5efae6419
@ -26,7 +26,8 @@ export const TxDetailsWrapper = ({
|
||||
const {
|
||||
state: { data: blockData },
|
||||
} = useFetch<TendermintBlocksResponse>(
|
||||
`${DATA_SOURCES.tendermintUrl}/block?height=${height}`
|
||||
`${DATA_SOURCES.tendermintUrl}/block?height=${height}`,
|
||||
{ cache: 'force-cache' }
|
||||
);
|
||||
|
||||
const child = useMemo(() => getTransactionComponent(txData), [txData]);
|
||||
|
@ -44,7 +44,7 @@ const Blocks = () => {
|
||||
refetch,
|
||||
} = useFetch<TendermintBlockchainResponse>(
|
||||
`${DATA_SOURCES.tendermintUrl}/blockchain`,
|
||||
undefined,
|
||||
{ cache: 'no-cache' },
|
||||
false
|
||||
);
|
||||
|
||||
|
@ -23,7 +23,8 @@ const Block = () => {
|
||||
const {
|
||||
state: { data: blockData, loading, error },
|
||||
} = useFetch<TendermintBlocksResponse>(
|
||||
`${DATA_SOURCES.tendermintUrl}/block?height=${block}`
|
||||
`${DATA_SOURCES.tendermintUrl}/block?height=${block}`,
|
||||
{ cache: 'force-cache' }
|
||||
);
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user