mirror of
				https://github.com/langgenius/dify.git
				synced 2025-10-29 18:03:13 +00:00 
			
		
		
		
	 9253f72dea
			
		
	
	
		9253f72dea
		
			
		
	
	
	
	
		
			
			Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: JzoNg <jzongcode@gmail.com>
		
			
				
	
	
		
			18 lines
		
	
	
		
			627 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			627 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import useSWR from 'swr'
 | |
| import { useTranslation } from 'react-i18next'
 | |
| import DataSourceNotion from './data-source-notion'
 | |
| import { fetchDataSource } from '@/service/common'
 | |
| 
 | |
| export default function DataSourcePage() {
 | |
|   const { t } = useTranslation()
 | |
|   const { data } = useSWR({ url: 'data-source/integrates' }, fetchDataSource)
 | |
|   const notionWorkspaces = data?.data.filter(item => item.provider === 'notion') || []
 | |
| 
 | |
|   return (
 | |
|     <div className='mb-8'>
 | |
|       <div className='mb-2 text-sm font-medium text-gray-900'>{t('common.dataSource.add')}</div>
 | |
|       <DataSourceNotion workspaces={notionWorkspaces} />
 | |
|     </div>
 | |
|   )
 | |
| }
 |