mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-04 03:13:58 +08:00
fix: hide the add button when the folder is a knowledge base (#765)
### What problem does this PR solve? #764 fix: hide the add button when the folder is a knowledge base ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
d7744f5870
commit
282f0857a3
@ -28,4 +28,5 @@ export interface IFolder {
|
||||
type: string;
|
||||
update_date: string;
|
||||
update_time: number;
|
||||
source_type: string;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import {
|
||||
useSelectBreadcrumbItems,
|
||||
} from './hooks';
|
||||
|
||||
import { useSelectParentFolderList } from '@/hooks/fileManagerHooks';
|
||||
import styles from './index.less';
|
||||
|
||||
interface IProps {
|
||||
@ -46,7 +47,9 @@ const FileToolbar = ({
|
||||
const { handleInputChange, searchString } = useHandleSearchChange();
|
||||
const breadcrumbItems = useSelectBreadcrumbItems();
|
||||
const { handleBreadcrumbClick } = useHandleBreadcrumbClick();
|
||||
const isKnowledgeBase = breadcrumbItems.at(-1)?.title === '.knowledgebase';
|
||||
const parentFolderList = useSelectParentFolderList();
|
||||
const isKnowledgeBase =
|
||||
parentFolderList.at(-1)?.source_type === 'knowledgebase';
|
||||
|
||||
const itemRender: BreadcrumbProps['itemRender'] = (
|
||||
currentRoute,
|
||||
|
Loading…
x
Reference in New Issue
Block a user