mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: fatelei <fatelei@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: CodingOnStar <hanxujiang@dify.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: 姜涵煦 <hanxujiang@jianghanxudeMacBook-Pro-2.local> Co-authored-by: L1nSn0w <l1nsn0w@qq.com> Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
26 lines
1.0 KiB
TypeScript
26 lines
1.0 KiB
TypeScript
'use client'
|
|
|
|
import type { DocPathWithoutLang } from '@/types/doc-paths'
|
|
import { useTranslation } from '#i18n'
|
|
import {
|
|
SubmitRequestDropdown,
|
|
SubmitRequestDropdownMenu,
|
|
} from '@/app/components/plugins/plugin-page/nav-operations'
|
|
import { defaultDocBaseUrl } from '@/context/i18n'
|
|
import { getDocLanguage } from '@/i18n-config/language'
|
|
|
|
function MarketplaceGuide() {
|
|
const { i18n } = useTranslation()
|
|
const docLanguage = getDocLanguage(i18n.language)
|
|
const docLink = (path: DocPathWithoutLang) => `${defaultDocBaseUrl}/${docLanguage}${path}`
|
|
|
|
return <SubmitRequestDropdownMenu dividerAfterFirst docLink={docLink} />
|
|
}
|
|
|
|
export default function HomeGuide({ isMarketplacePlatform }: { isMarketplacePlatform: boolean }) {
|
|
// Standalone Marketplace cannot call useDocLink(): it reads the console-only
|
|
// systemFeatures suspense query and crashes SSR. The dropdown paths have no
|
|
// product-specific variants, so composing the URL from the locale matches.
|
|
return isMarketplacePlatform ? <MarketplaceGuide /> : <SubmitRequestDropdown dividerAfterFirst />
|
|
}
|