Skip to content

Commit

Permalink
chore: useCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
muliswilliam committed Jul 28, 2022
1 parent 8549236 commit 0a570f4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ export const PortfolioAsset = () => {
setHideBalances(prevHideBalances => !prevHideBalances)
}, [])

const onNftDetailsLoad = React.useCallback(() => setNftIframeLoaded(true), [])

// effects
React.useEffect(() => {
setfilteredAssetList(userAssetList)
Expand Down Expand Up @@ -425,7 +427,7 @@ export const PortfolioAsset = () => {
}

<NftDetails
onLoad={() => setNftIframeLoaded(true)}
onLoad={onNftDetailsLoad}
visible={selectedAsset?.isErc721}
ref={nftDetailsRef}
sandbox="allow-scripts allow-popups allow-same-origin"
Expand Down

0 comments on commit 0a570f4

Please sign in to comment.