diff --git a/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx b/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx index e917199a81..37f2bde06f 100644 --- a/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx +++ b/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx @@ -1,6 +1,6 @@ 'use client' import type { FC } from 'react' -import React from 'react' +import React, { useEffect } from 'react' import type { PluginDeclaration } from '../../../types' import Card from '../../../card' import { pluginManifestToCardPluginProps } from '../../utils' @@ -42,6 +42,11 @@ const Installed: FC = ({ const installedVersion = installedInfoPayload?.installedVersion const hasInstalled = !!installedVersion + useEffect(() => { + if (hasInstalled && toInstallVersion === installedVersion) + onInstalled() + }, [hasInstalled, toInstallVersion, installedVersion]) + const [isInstalling, setIsInstalling] = React.useState(false) const { mutateAsync: installPackageFromLocal } = useInstallPackageFromLocal() const { mutateAsync: updatePackageFromMarketPlace } = useUpdatePackageFromMarketPlace()