mirror of https://github.com/langgenius/dify.git
refactor: remove unused DataSourceType import and simplify iconType handling in DatasetDetailLayout
This commit is contained in:
parent
101d6504fb
commit
14d8788dac
|
|
@ -15,7 +15,6 @@ import {
|
|||
import AppSideBar from '@/app/components/app-sidebar'
|
||||
import Loading from '@/app/components/base/loading'
|
||||
import DatasetDetailContext from '@/context/dataset-detail'
|
||||
import { DataSourceType } from '@/models/datasets'
|
||||
import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
|
||||
import { useStore } from '@/app/components/app/store'
|
||||
import { useAppContext } from '@/context/app-context'
|
||||
|
|
@ -138,7 +137,7 @@ const DatasetDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
|
|||
? mode => <ExtraInfo relatedApps={relatedApps} expand={mode === 'expand'} documentCount={datasetRes?.document_count} />
|
||||
: undefined
|
||||
}
|
||||
iconType={datasetRes?.data_source_type === DataSourceType.NOTION ? 'notion' : 'dataset'}
|
||||
iconType='dataset'
|
||||
/>
|
||||
)}
|
||||
<div className='grow overflow-hidden bg-background-default-subtle'>{children}</div>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import { getKeyboardKeyCodeBySystem } from '../workflow/utils'
|
|||
import DatasetSidebarDropdown from './dataset-sidebar-dropdown'
|
||||
|
||||
export type IAppDetailNavProps = {
|
||||
iconType?: 'app' | 'dataset' | 'notion'
|
||||
iconType?: 'app' | 'dataset'
|
||||
navigation: Array<{
|
||||
name: string
|
||||
href: string
|
||||
|
|
|
|||
|
|
@ -270,7 +270,6 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
|
|||
})
|
||||
invalidDocumentList()
|
||||
setTimerCanRun(true)
|
||||
// mutateDatasetIndexingStatus(undefined, { revalidate: true })
|
||||
setNotionPageSelectorModalVisible(false)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue