mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
no loading spinner on refetch pool shares
This commit is contained in:
parent
852e71f17a
commit
c9f56e9a46
@ -88,7 +88,7 @@ export default function Stats({
|
||||
}
|
||||
}
|
||||
getAccountTVL()
|
||||
}, [publishedAssets])
|
||||
}, [publishedAssets, accountId, chainIds])
|
||||
|
||||
return (
|
||||
<div className={styles.stats}>
|
||||
|
@ -210,7 +210,6 @@ export default function PoolShares({
|
||||
|
||||
const fetchPoolSharesData = useCallback(async () => {
|
||||
try {
|
||||
setLoading(true)
|
||||
const data = await getPoolSharesData(accountId, chainIds)
|
||||
const newAssets = await getPoolSharesAssets(data)
|
||||
|
||||
@ -219,14 +218,14 @@ export default function PoolShares({
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching pool shares: ', error.message)
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
}, [accountId, assets, chainIds])
|
||||
|
||||
useEffect(() => {
|
||||
async function init() {
|
||||
setLoading(true)
|
||||
await fetchPoolSharesData()
|
||||
setLoading(false)
|
||||
|
||||
if (dataFetchInterval) return
|
||||
const interval = setInterval(async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user