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.

1.0 KB
Raw Blame
'use client'

import type { DocPathWithoutLang } from '@/types/doc-paths'
import { useLocale } from '#i18n'
import {
  SubmitRequestMenu,
  SubmitRequestMenuView,
} from '@/app/components/plugins/plugin-page/nav-operations'
import { defaultDocBaseUrl } from '@/context/i18n'
import { getDocLanguage } from '@/i18n/language'

function MarketplaceGuide() {
  const locale = useLocale()
  const docLanguage = getDocLanguage(locale)
  const docLink = (path: DocPathWithoutLang) => `${defaultDocBaseUrl}/${docLanguage}${path}`

  return <SubmitRequestMenuView 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 menu paths have no
  // product-specific variants, so composing the URL from the locale matches.
  return isMarketplacePlatform ? <MarketplaceGuide /> : <SubmitRequestMenu dividerAfterFirst />
}