mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
effect dependency fixes
This commit is contained in:
parent
18b487dd75
commit
c0c709e7f5
@ -5,7 +5,6 @@ import { AssetSelectionAsset } from '@shared/FormFields/AssetSelection'
|
||||
import AssetComputeList from '@shared/AssetList/AssetComputeList'
|
||||
import { useCancelToken } from '@hooks/useCancelToken'
|
||||
import { getServiceByName } from '@utils/ddo'
|
||||
import { Asset } from '@oceanprotocol/lib'
|
||||
import { AssetExtended } from 'src/@types/AssetExtended'
|
||||
|
||||
export default function AlgorithmDatasetsListForCompute({
|
||||
@ -15,9 +14,9 @@ export default function AlgorithmDatasetsListForCompute({
|
||||
asset: AssetExtended
|
||||
algorithmDid: string
|
||||
}): ReactElement {
|
||||
const newCancelToken = useCancelToken()
|
||||
const [datasetsForCompute, setDatasetsForCompute] =
|
||||
useState<AssetSelectionAsset[]>()
|
||||
const newCancelToken = useCancelToken()
|
||||
|
||||
useEffect(() => {
|
||||
if (!asset) return
|
||||
@ -37,7 +36,7 @@ export default function AlgorithmDatasetsListForCompute({
|
||||
setDatasetsForCompute(datasets)
|
||||
}
|
||||
asset.metadata.type === 'algorithm' && getDatasetsAllowedForCompute()
|
||||
}, [asset?.metadata?.type])
|
||||
}, [asset, algorithmDid, newCancelToken])
|
||||
|
||||
return (
|
||||
<div className={styles.datasetsContainer}>
|
||||
|
Loading…
Reference in New Issue
Block a user