Fix: Optimize code and fix ts type errors #9869 (#10666)

### 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:
chanx
2025-10-20 15:59:56 +08:00
committed by GitHub
parent cc703da747
commit de46b0d46e
18 changed files with 377 additions and 267 deletions

View File

@ -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,

View File

@ -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 });
};