dify/web/context/dataset-detail.ts

9 lines
360 B
TypeScript
Raw Normal View History

import { createContext, useContext } from 'use-context-selector'
import type { DataSet } from '@/models/datasets'
2023-05-15 08:51:32 +08:00
2023-06-19 16:32:25 +08:00
const DatasetDetailContext = createContext<{ indexingTechnique?: string; dataset?: DataSet; mutateDatasetRes?: () => void }>({})
2023-05-15 08:51:32 +08:00
export const useDatasetDetailContext = () => useContext(DatasetDetailContext)
2023-05-15 08:51:32 +08:00
export default DatasetDetailContext