diff --git a/web/app/(commonLayout)/plugins/test/other/page.tsx b/web/app/(commonLayout)/plugins/test/other/page.tsx deleted file mode 100644 index 3166e34ba3..0000000000 --- a/web/app/(commonLayout)/plugins/test/other/page.tsx +++ /dev/null @@ -1,20 +0,0 @@ -'use client' -import { useBoolean } from 'ahooks' -import UpdatePlugin from '@/app/components/plugins/update-plugin' - -const Page = () => { - const [isShowUpdateModal, { - setTrue: showUpdateModal, - setFalse: hideUpdateModal, - }] = useBoolean(false) - return ( -
-
Show Upgrade
- {isShowUpdateModal && ( - - )} -
- ) -} - -export default Page diff --git a/web/app/components/plugins/plugin-page/index.tsx b/web/app/components/plugins/plugin-page/index.tsx index e743e248bc..4c6e67a64d 100644 --- a/web/app/components/plugins/plugin-page/index.tsx +++ b/web/app/components/plugins/plugin-page/index.tsx @@ -77,6 +77,7 @@ const PluginPage = ({ if (packageId) { const { data } = await fetchManifestFromMarketPlace(encodeURIComponent(packageId)) const { plugin } = data + // TODO: wait api return current plugin version setManifest({ ...plugin, icon: `${marketplaceApiPrefix}/plugins/${plugin.org}/${plugin.name}/icon`, @@ -84,6 +85,7 @@ const PluginPage = ({ showInstallFromMarketplace() } })() + // eslint-disable-next-line react-hooks/exhaustive-deps }, [packageId]) const { diff --git a/web/app/components/plugins/update-plugin/from-market-place.tsx b/web/app/components/plugins/update-plugin/from-market-place.tsx index 20dfc294a7..071b143115 100644 --- a/web/app/components/plugins/update-plugin/from-market-place.tsx +++ b/web/app/components/plugins/update-plugin/from-market-place.tsx @@ -94,11 +94,9 @@ const UpdatePluginModal: FC = ({ } return } - if (uploadStep === UploadStep.installed) { + if (uploadStep === UploadStep.installed) onSave() - onCancel() - } - }, [onCancel, onSave, uploadStep, check, originalPackageInfo.id, handleRefetch, targetPackageInfo.id]) + }, [onSave, uploadStep, check, originalPackageInfo.id, handleRefetch, targetPackageInfo.id]) const usedInAppInfo = useMemo(() => { return (