Files
ragflow/web/src/pages/home/chat-list.tsx
balibabu b8bfbac2e5 Feat: Switch the root route to the new page #3221 (#9560)
### What problem does this PR solve?

Feat: Switch the root route to the new page #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-08-19 17:41:03 +08:00

21 lines
567 B
TypeScript

import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
import { useFetchDialogList } from '@/hooks/use-chat-request';
import { ApplicationCard } from './application-card';
export function ChatList() {
const { data } = useFetchDialogList();
const { navigateToChat } = useNavigatePage();
return data.dialogs.slice(0, 10).map((x) => (
<ApplicationCard
key={x.id}
app={{
avatar: x.icon,
title: x.name,
update_time: x.update_time,
}}
onClick={navigateToChat(x.id)}
></ApplicationCard>
));
}