mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
29 lines
866 B
TypeScript
29 lines
866 B
TypeScript
import type { LegacyPluginsSearchParams } from '@/app/components/plugins/plugin-routes'
|
|
import Marketplace from '@/app/components/plugins/marketplace'
|
|
import PluginPage from '@/app/components/plugins/plugin-page'
|
|
import PluginsPanel from '@/app/components/plugins/plugin-page/plugins-panel'
|
|
import { getLegacyPluginRedirectPath } from '@/app/components/plugins/plugin-routes'
|
|
import { redirect } from '@/next/navigation'
|
|
|
|
type PluginListProps = {
|
|
searchParams?: Promise<LegacyPluginsSearchParams>
|
|
}
|
|
|
|
const PluginList = async ({
|
|
searchParams,
|
|
}: PluginListProps) => {
|
|
const redirectPath = getLegacyPluginRedirectPath(await searchParams)
|
|
|
|
if (redirectPath)
|
|
redirect(redirectPath)
|
|
|
|
return (
|
|
<PluginPage
|
|
plugins={<PluginsPanel />}
|
|
marketplace={<Marketplace pluginTypeSwitchClassName="top-[60px]" />}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default PluginList
|