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()
|
getAccountTVL()
|
||||||
}, [publishedAssets])
|
}, [publishedAssets, accountId, chainIds])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.stats}>
|
<div className={styles.stats}>
|
||||||
|
@ -210,7 +210,6 @@ export default function PoolShares({
|
|||||||
|
|
||||||
const fetchPoolSharesData = useCallback(async () => {
|
const fetchPoolSharesData = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true)
|
|
||||||
const data = await getPoolSharesData(accountId, chainIds)
|
const data = await getPoolSharesData(accountId, chainIds)
|
||||||
const newAssets = await getPoolSharesAssets(data)
|
const newAssets = await getPoolSharesAssets(data)
|
||||||
|
|
||||||
@ -219,14 +218,14 @@ export default function PoolShares({
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching pool shares: ', error.message)
|
console.error('Error fetching pool shares: ', error.message)
|
||||||
} finally {
|
|
||||||
setLoading(false)
|
|
||||||
}
|
}
|
||||||
}, [accountId, assets, chainIds])
|
}, [accountId, assets, chainIds])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function init() {
|
async function init() {
|
||||||
|
setLoading(true)
|
||||||
await fetchPoolSharesData()
|
await fetchPoolSharesData()
|
||||||
|
setLoading(false)
|
||||||
|
|
||||||
if (dataFetchInterval) return
|
if (dataFetchInterval) return
|
||||||
const interval = setInterval(async () => {
|
const interval = setInterval(async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user