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
|
action?: ReactElement
|
||||||
queryData?: string
|
queryData?: string
|
||||||
}) {
|
}) {
|
||||||
const { appConfig } = useSiteMetadata()
|
|
||||||
const { chainIds } = useUserPreferences()
|
const { chainIds } = useUserPreferences()
|
||||||
const [result, setResult] = useState<any>()
|
const [result, setResult] = useState<any>()
|
||||||
const [loading, setLoading] = useState<boolean>()
|
const [loading, setLoading] = useState<boolean>()
|
||||||
const isMounted = useIsMounted()
|
const isMounted = useIsMounted()
|
||||||
const newCancelToken = useCancelToken()
|
const newCancelToken = useCancelToken()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!appConfig.metadataCacheUri) return
|
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
if (chainIds.length === 0) {
|
if (chainIds.length === 0) {
|
||||||
const result: any = {
|
const result: any = {
|
||||||
@ -106,14 +103,7 @@ function SectionQueryResult({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
init()
|
init()
|
||||||
}, [
|
}, [isMounted, newCancelToken, query])
|
||||||
appConfig.metadataCacheUri,
|
|
||||||
chainIds.length,
|
|
||||||
isMounted,
|
|
||||||
newCancelToken,
|
|
||||||
query,
|
|
||||||
queryData
|
|
||||||
])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={styles.section}>
|
<section className={styles.section}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user