diff --git a/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx b/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx index 1cb0594e32..d8de71c4de 100644 --- a/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx +++ b/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx @@ -1,6 +1,6 @@ 'use client' import type { FC } from 'react' -import React, { useMemo } from 'react' +import React, { useEffect, useMemo } from 'react' // import { RiInformation2Line } from '@remixicon/react' import type { Plugin, PluginManifestInMarket } from '../../../types' import Card from '../../../card' @@ -51,6 +51,11 @@ const Installed: FC = ({ stop, } = checkTaskStatus() + useEffect(() => { + if (hasInstalled && toInstallVersion === installedVersion) + onInstalled() + }, [hasInstalled, toInstallVersion, installedVersion]) + const handleCancel = () => { stop() onCancel() @@ -107,7 +112,7 @@ const Installed: FC = ({ return (<>{ !installedVersion ? ( - { } + {toInstallVersion} ) : ( <>