mirror of
https://github.com/langgenius/dify.git
synced 2025-10-26 00:18:44 +00:00
36 lines
714 B
TypeScript
36 lines
714 B
TypeScript
'use client'
|
|
import React from 'react'
|
|
import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'
|
|
import DocumentSettings from './document-settings'
|
|
import PipelineSettings from './pipeline-settings'
|
|
|
|
type SettingsProps = {
|
|
datasetId: string
|
|
documentId: string
|
|
}
|
|
|
|
const Settings = ({
|
|
datasetId,
|
|
documentId,
|
|
}: SettingsProps) => {
|
|
const pipelineId = useDatasetDetailContextWithSelector(s => s.dataset?.pipeline_id)
|
|
|
|
if (!pipelineId) {
|
|
return (
|
|
<DocumentSettings
|
|
datasetId={datasetId}
|
|
documentId={documentId}
|
|
/>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<PipelineSettings
|
|
datasetId={datasetId}
|
|
documentId={documentId}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default Settings
|