Skip to content

Commit

Permalink
Disable react-query cache in latest tx and blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Jul 13, 2023
1 parent e1c5819 commit a9641a7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/732.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable react-query cache in the latest tx and blocks
11 changes: 10 additions & 1 deletion src/app/pages/ParatimeDashboardPage/LatestBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ export const LatestBlocks: FC<{ scope: SearchScope }> = ({ scope }) => {
// Listing the latest consensus blocks is not yet implemented.
// We should use useGetConsensusBlocks()
}
const blocksQuery = useGetRuntimeBlocks(network, layer, { limit })
const blocksQuery = useGetRuntimeBlocks(
network,
layer,
{ limit },
{
query: {
cacheTime: 0,
},
},
)

return (
<Card>
Expand Down
11 changes: 10 additions & 1 deletion src/app/pages/ParatimeDashboardPage/LatestTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ export const LatestTransactions: FC<{ scope: SearchScope }> = ({ scope }) => {
// Listing the latest consensus transactions is not yet supported.
// We should use useGetConsensusTransactions()
}
const transactionsQuery = useGetRuntimeTransactions(network, layer, { limit })
const transactionsQuery = useGetRuntimeTransactions(
network,
layer,
{ limit },
{
query: {
cacheTime: 0,
},
},
)

return (
<Card>
Expand Down

0 comments on commit a9641a7

Please sign in to comment.