mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Data assets not updating properly when selected networks are changed in home page (#889)
* removed dependencies * fix lint error * removed appConfig
This commit is contained in:
parent
e15169219f
commit
9b3cb3963e
@ -67,15 +67,12 @@ function SectionQueryResult({
|
||||
action?: ReactElement
|
||||
queryData?: string
|
||||
}) {
|
||||
const { appConfig } = useSiteMetadata()
|
||||
const { chainIds } = useUserPreferences()
|
||||
const [result, setResult] = useState<any>()
|
||||
const [loading, setLoading] = useState<boolean>()
|
||||
const isMounted = useIsMounted()
|
||||
const newCancelToken = useCancelToken()
|
||||
useEffect(() => {
|
||||
if (!appConfig.metadataCacheUri) return
|
||||
|
||||
async function init() {
|
||||
if (chainIds.length === 0) {
|
||||
const result: any = {
|
||||
@ -106,14 +103,7 @@ function SectionQueryResult({
|
||||
}
|
||||
}
|
||||
init()
|
||||
}, [
|
||||
appConfig.metadataCacheUri,
|
||||
chainIds.length,
|
||||
isMounted,
|
||||
newCancelToken,
|
||||
query,
|
||||
queryData
|
||||
])
|
||||
}, [isMounted, newCancelToken, query])
|
||||
|
||||
return (
|
||||
<section className={styles.section}>
|
||||
|
Loading…
Reference in New Issue
Block a user