dify/web/app/components/plugins/marketplace/index.tsx

39 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-10-12 18:02:24 +08:00
import { MarketplaceContextProvider } from './context'
import Description from './description'
import IntersectionLine from './intersection-line'
2024-10-31 18:54:13 +08:00
import SearchBoxWrapper from './search-box/search-box-wrapper'
2024-10-12 18:02:24 +08:00
import PluginTypeSwitch from './plugin-type-switch'
2024-10-28 11:50:26 +08:00
import ListWrapper from './list/list-wrapper'
2024-10-29 14:44:30 +08:00
import { getMarketplaceCollectionsAndPlugins } from './utils'
2024-11-08 18:21:39 +08:00
import { TanstackQueryIniter } from '@/context/query-client'
2024-10-28 11:50:26 +08:00
2024-10-30 11:06:54 +08:00
type MarketplaceProps = {
2024-11-06 11:55:19 +08:00
locale?: string
2024-10-30 11:06:54 +08:00
showInstallButton?: boolean
}
const Marketplace = async ({
2024-11-06 11:55:19 +08:00
locale,
2024-10-30 11:06:54 +08:00
showInstallButton = true,
}: MarketplaceProps) => {
2024-10-29 14:44:30 +08:00
const { marketplaceCollections, marketplaceCollectionPluginsMap } = await getMarketplaceCollectionsAndPlugins()
2024-10-08 17:57:46 +08:00
return (
2024-11-08 18:21:39 +08:00
<TanstackQueryIniter>
<MarketplaceContextProvider>
<Description locale={locale} />
<IntersectionLine />
<SearchBoxWrapper locale={locale} />
<PluginTypeSwitch locale={locale} />
<ListWrapper
locale={locale}
marketplaceCollections={marketplaceCollections}
marketplaceCollectionPluginsMap={marketplaceCollectionPluginsMap}
showInstallButton={showInstallButton}
/>
</MarketplaceContextProvider>
</TanstackQueryIniter>
2024-10-08 17:57:46 +08:00
)
}
2024-10-11 16:15:24 +08:00
export default Marketplace