mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-21 13:32:49 +08:00
feat: jumping from the chunk list page to the file list page keeps th… (#174)
* feat: jumping from the chunk list page to the file list page keeps the original page number. * feat: jump to the file upload page and reset the file list page number to 1
This commit is contained in:
@ -1,9 +1,13 @@
|
||||
import { useKnowledgeBaseId } from '@/hooks/knowledgeHook';
|
||||
import { useSecondPathName, useThirdPathName } from '@/hooks/routeHook';
|
||||
import {
|
||||
useNavigateWithFromState,
|
||||
useSecondPathName,
|
||||
useThirdPathName,
|
||||
} from '@/hooks/routeHook';
|
||||
import { Breadcrumb } from 'antd';
|
||||
import { ItemType } from 'antd/es/breadcrumb/Breadcrumb';
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import { Link, Outlet, useDispatch, useLocation, useNavigate } from 'umi';
|
||||
import { useEffect, useMemo } from 'react';
|
||||
import { Link, Outlet, useDispatch, useLocation } from 'umi';
|
||||
import Siderbar from './components/knowledge-sidebar';
|
||||
import {
|
||||
KnowledgeDatasetRouteKey,
|
||||
@ -15,7 +19,6 @@ import styles from './index.less';
|
||||
|
||||
const KnowledgeAdding = () => {
|
||||
const dispatch = useDispatch();
|
||||
const navigate = useNavigate();
|
||||
const knowledgeBaseId = useKnowledgeBaseId();
|
||||
|
||||
const location = useLocation();
|
||||
@ -25,14 +28,12 @@ const KnowledgeAdding = () => {
|
||||
const datasetActiveKey: KnowledgeDatasetRouteKey =
|
||||
useThirdPathName() as KnowledgeDatasetRouteKey;
|
||||
|
||||
const gotoList = useCallback(() => {
|
||||
navigate('/knowledge');
|
||||
}, [navigate]);
|
||||
const gotoList = useNavigateWithFromState();
|
||||
|
||||
const breadcrumbItems: ItemType[] = useMemo(() => {
|
||||
const items: ItemType[] = [
|
||||
{
|
||||
title: <a onClick={gotoList}>Knowledge Base</a>,
|
||||
title: <a onClick={() => gotoList('/knowledge')}>Knowledge Base</a>,
|
||||
},
|
||||
{
|
||||
title: datasetActiveKey ? (
|
||||
|
||||
Reference in New Issue
Block a user