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)
This commit is contained in:
balibabu
2025-08-19 17:41:03 +08:00
committed by GitHub
parent d5729e598f
commit b8bfbac2e5
12 changed files with 265 additions and 164 deletions

View File

@ -1,15 +1,20 @@
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 }}
></ApplicationCard>
));
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>
));
}