You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tsx 763B

12345678910111213141516171819
  1. import useSWR from 'swr'
  2. import DataSourceNotion from './data-source-notion'
  3. import DataSourceWebsite from './data-source-website'
  4. import { fetchDataSource } from '@/service/common'
  5. import { DataSourceProvider } from '@/models/common'
  6. export default function DataSourcePage() {
  7. const { data } = useSWR({ url: 'data-source/integrates' }, fetchDataSource)
  8. const notionWorkspaces = data?.data.filter(item => item.provider === 'notion') || []
  9. return (
  10. <div className='mb-8'>
  11. <DataSourceNotion workspaces={notionWorkspaces} />
  12. <DataSourceWebsite provider={DataSourceProvider.jinaReader} />
  13. <DataSourceWebsite provider={DataSourceProvider.fireCrawl} />
  14. <DataSourceWebsite provider={DataSourceProvider.waterCrawl} />
  15. </div>
  16. )
  17. }