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

36 lines
1.1 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-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-10-12 18:02:24 +08:00
<MarketplaceContextProvider>
2024-11-06 11:55:19 +08:00
<Description locale={locale} />
2024-10-12 18:02:24 +08:00
<IntersectionLine />
2024-11-06 11:55:19 +08:00
<SearchBoxWrapper locale={locale} />
<PluginTypeSwitch locale={locale} />
2024-10-28 11:50:26 +08:00
<ListWrapper
2024-11-06 11:55:19 +08:00
locale={locale}
2024-10-28 11:50:26 +08:00
marketplaceCollections={marketplaceCollections}
marketplaceCollectionPluginsMap={marketplaceCollectionPluginsMap}
2024-10-30 11:06:54 +08:00
showInstallButton={showInstallButton}
2024-10-28 11:50:26 +08:00
/>
2024-10-12 18:02:24 +08:00
</MarketplaceContextProvider>
2024-10-08 17:57:46 +08:00
)
}
2024-10-11 16:15:24 +08:00
export default Marketplace