diff --git a/web/app/components/plugins/plugin-page/index.tsx b/web/app/components/plugins/plugin-page/index.tsx index d326fdf6e4..4b8444ab34 100644 --- a/web/app/components/plugins/plugin-page/index.tsx +++ b/web/app/components/plugins/plugin-page/index.tsx @@ -72,6 +72,8 @@ const PluginPage = ({ } }, [searchParams]) + const [uniqueIdentifier, setUniqueIdentifier] = useState(null) + const [dependencies, setDependencies] = useState([]) const bundleInfo = useMemo(() => { const info = searchParams.get(BUNDLE_INFO_KEY) @@ -99,6 +101,7 @@ const PluginPage = ({ useEffect(() => { (async () => { + setUniqueIdentifier(null) await sleep(100) if (packageId) { const { data } = await fetchManifestFromMarketPlace(encodeURIComponent(packageId)) @@ -108,6 +111,7 @@ const PluginPage = ({ version: version.version, icon: `${MARKETPLACE_API_PREFIX}/plugins/${plugin.org}/${plugin.name}/icon`, }) + setUniqueIdentifier(packageId) showInstallFromMarketplace() return } @@ -283,10 +287,10 @@ const PluginPage = ({ )} { - isShowInstallFromMarketplace && ( + isShowInstallFromMarketplace && uniqueIdentifier && (