Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

don't add search params when opening detail links from marketplace. (#22034)

NFishf62b59a80568
diff --git a/web/app/components/plugins/marketplace/list/card-wrapper.tsx b/web/app/components/plugins/marketplace/list/card-wrapper.tsx
index 5e4b621796e..8d9f3a5b108 100644
--- a/web/app/components/plugins/marketplace/list/card-wrapper.tsx
+++ b/web/app/components/plugins/marketplace/list/card-wrapper.tsx
@@ -1,7 +1,7 @@
'use client'
import { useTheme } from 'next-themes'
import { RiArrowRightUpLine } from '@remixicon/react'
-import { getPluginLinkInMarketplace } from '../utils'
+import { getPluginDetailLinkInMarketplace, getPluginLinkInMarketplace } from '../utils'
import Card from '@/app/components/plugins/card'
import CardMoreInfo from '@/app/components/plugins/card/card-more-info'
import type { Plugin } from '@/app/components/plugins/types'
@@ -83,7 +83,7 @@ const CardWrapper = ({
return (
<a
className='group relative inline-block cursor-pointer rounded-xl'
- href={getPluginLinkInMarketplace(plugin)}
+ href={getPluginDetailLinkInMarketplace(plugin)}
>
<Card
key={plugin.name}
diff --git a/web/app/components/plugins/marketplace/utils.ts b/web/app/components/plugins/marketplace/utils.ts
index c112a4aad85..b3032968aba 100644
--- a/web/app/components/plugins/marketplace/utils.ts
+++ b/web/app/components/plugins/marketplace/utils.ts
@@ -38,6 +38,12 @@ export const getPluginLinkInMarketplace = (plugin: Plugin, params?: Record<strin
return getMarketplaceUrl(`/plugins/${plugin.org}/${plugin.name}`, params)
}
+export const getPluginDetailLinkInMarketplace = (plugin: Plugin) => {
+ if (plugin.type === 'bundle')
+ return `/bundles/${plugin.org}/${plugin.name}`
+ return `/plugins/${plugin.org}/${plugin.name}`
+}
+
export const getMarketplacePluginsByCollectionId = async (collectionId: string, query?: CollectionsAndPluginsSearchParams) => {
let plugins = [] as Plugin[]