fix: consistent revoke hook time

This commit is contained in:
EnixCoda 2019-12-26 00:08:20 +08:00
parent 99733e78ad
commit 6b4e961afe
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -77,11 +77,12 @@ const NodeItemIcon = React.memo(function NodeItemIcon({
val: { icons },
} = useConfigs()
if (icons === 'native') return <Icon type={getIconType(node)} />
const src = React.useMemo(
() => (node.type === 'tree' ? getFolderIconSrc(node, open) : getFileIconSrc(node)),
[open],
)
if (icons === 'native') return <Icon type={getIconType(node)} />
return (
<>
<Icon placeholder={node.type !== 'tree'} type={getIconType(node)} />