fix: stop anim

This commit is contained in:
Joel 2025-01-08 19:34:41 +08:00
parent 6483d20f56
commit 7ccc268ced
2 changed files with 2 additions and 5 deletions

View File

@ -72,10 +72,12 @@ const InstallFromMarketplace: React.FC<InstallFromMarketplaceProps> = ({
const handleInstalled = useCallback(() => {
setStep(InstallStep.installed)
refreshPluginList(manifest)
setIsInstalling(false)
}, [manifest, refreshPluginList])
const handleFailed = useCallback((errorMsg?: string) => {
setStep(InstallStep.installFailed)
setIsInstalling(false)
if (errorMsg)
setErrorMsg(errorMsg)
}, [])
@ -112,7 +114,6 @@ const InstallFromMarketplace: React.FC<InstallFromMarketplaceProps> = ({
onInstalled={handleInstalled}
onFailed={handleFailed}
onStartToInstall={handleStartToInstall}
clearCountDown={clearCountDown}
/>
)}
{

View File

@ -22,7 +22,6 @@ type Props = {
onCancel: () => void
onStartToInstall?: () => void
onInstalled: () => void
clearCountDown: () => void
onFailed: (message?: string) => void
}
@ -32,7 +31,6 @@ const Installed: FC<Props> = ({
onCancel,
onStartToInstall,
onInstalled,
clearCountDown,
onFailed,
}) => {
const { t } = useTranslation()
@ -93,8 +91,6 @@ const Installed: FC<Props> = ({
isInstalled = all_installed
}
clearCountDown()
if (isInstalled) {
onInstalled()
return