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.

740 B
Raw Blame
import type { IntegrationRouteSearchParams } from '@/app/components/integrations/routes'
import { getIntegrationRouteTargetBySlug } from '@/app/components/integrations/routes'
import { notFound, redirect } from '@/next/navigation'

type IntegrationsRoutePageProps = {
  params: Promise<{
    slug?: string[]
  }>
  searchParams?: Promise<IntegrationRouteSearchParams>
}

const IntegrationsRoutePage = async ({ params, searchParams }: IntegrationsRoutePageProps) => {
  const { slug } = await params
  const target = getIntegrationRouteTargetBySlug(slug, await searchParams)

  if (target.type === 'redirect') redirect(target.destination)

  if (target.type === 'not-found') notFound()

  return null
}

export default IntegrationsRoutePage