mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-01 17:45:28 +08:00
### What problem does this PR solve? Fix: Optimize code and fix ts type errors #9869 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -337,6 +337,8 @@ export const useRenameSearch = () => {
|
||||
});
|
||||
const detail = reponse.data?.data;
|
||||
console.log('detail-->', detail);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { id, created_by, update_time, ...searchDataTemp } = detail;
|
||||
res = await updateSearch({
|
||||
...searchDataTemp,
|
||||
|
||||
@ -5,14 +5,13 @@ import { Button } from '@/components/ui/button';
|
||||
import { RAGFlowPagination } from '@/components/ui/ragflow-pagination';
|
||||
import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { useFetchSearchList, useRenameSearch } from './hooks';
|
||||
import { SearchCard } from './search-card';
|
||||
|
||||
export default function SearchList() {
|
||||
// const { data } = useFetchFlowList();
|
||||
const { t } = useTranslate('search');
|
||||
const [isEdit, setIsEdit] = useState(false);
|
||||
// const [isEdit, setIsEdit] = useState(false);
|
||||
const {
|
||||
data: list,
|
||||
searchParams,
|
||||
@ -36,11 +35,11 @@ export default function SearchList() {
|
||||
});
|
||||
};
|
||||
const openCreateModalFun = () => {
|
||||
setIsEdit(false);
|
||||
// setIsEdit(false);
|
||||
showSearchRenameModal();
|
||||
};
|
||||
const handlePageChange = (page: number, pageSize: number) => {
|
||||
setIsEdit(false);
|
||||
// setIsEdit(false);
|
||||
setSearchListParams({ ...searchParams, page, page_size: pageSize });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user