mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Fix home card not responding to click events ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
21 lines
583 B
TypeScript
21 lines
583 B
TypeScript
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
|
import { useFetchSearchList } from '../next-searches/hooks';
|
|
import { ApplicationCard } from './application-card';
|
|
|
|
export function SearchList() {
|
|
const { data } = useFetchSearchList();
|
|
const { navigateToSearch } = useNavigatePage();
|
|
|
|
return data?.data.search_apps.slice(0, 10).map((x) => (
|
|
<ApplicationCard
|
|
key={x.id}
|
|
app={{
|
|
avatar: x.avatar,
|
|
title: x.name,
|
|
update_time: x.update_time,
|
|
}}
|
|
onClick={navigateToSearch(x.id)}
|
|
></ApplicationCard>
|
|
));
|
|
}
|