mirror of
https://github.com/langgenius/dify.git
synced 2025-07-15 13:14:44 +00:00
17 lines
449 B
TypeScript
17 lines
449 B
TypeScript
import { useQuery } from '@tanstack/react-query'
|
|
import { preImportNotionPages } from '../datasets'
|
|
|
|
type PreImportNotionPagesParams = {
|
|
url: string
|
|
datasetId?: string
|
|
}
|
|
|
|
export const usePreImportNotionPages = ({ datasetId }: PreImportNotionPagesParams) => {
|
|
return useQuery({
|
|
queryKey: ['notion-pre-import-pages'],
|
|
queryFn: async () => {
|
|
return preImportNotionPages({ url: '/notion/pre-import/pages', datasetId })
|
|
},
|
|
})
|
|
}
|