fix: detect is same packege use uniqid

This commit is contained in:
Joel 2024-11-29 10:56:58 +08:00
parent 47579c86e6
commit 35ef874867
2 changed files with 4 additions and 4 deletions

View File

@ -43,9 +43,9 @@ const Installed: FC<Props> = ({
const hasInstalled = !!installedVersion
useEffect(() => {
if (hasInstalled && toInstallVersion === installedVersion)
if (hasInstalled && uniqueIdentifier === installedInfoPayload.uniqueIdentifier)
onInstalled()
}, [hasInstalled, toInstallVersion, installedVersion])
}, [hasInstalled])
const [isInstalling, setIsInstalling] = React.useState(false)
const { mutateAsync: installPackageFromLocal } = useInstallPackageFromLocal()

View File

@ -52,9 +52,9 @@ const Installed: FC<Props> = ({
} = checkTaskStatus()
useEffect(() => {
if (hasInstalled && toInstallVersion === installedVersion)
if (hasInstalled && uniqueIdentifier === installedInfoPayload.uniqueIdentifier)
onInstalled()
}, [hasInstalled, toInstallVersion, installedVersion])
}, [hasInstalled])
const handleCancel = () => {
stop()