1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-28 00:27:49 +02: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:
Norbi 2021-09-30 10:26:00 +03:00 committed by GitHub
parent e15169219f
commit 9b3cb3963e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}>