彻底放弃客户端路由计划

This commit is contained in:
CrescentLeaf
2025-12-27 23:03:58 +08:00
parent 1e2e90f9e7
commit 12039612ca
19 changed files with 28 additions and 720 deletions

View File

@@ -5,10 +5,10 @@ import ChatFragment from "./ChatFragment"
import * as React from 'react'
import EffectOnly from "../EffectOnly"
export default function LazyChatFragment({ chatId, openedWithRouter }: { chatId: string, openedWithRouter: boolean }) {
export default function LazyChatFragment({ chatId, openedInDialog }: { chatId: string, openedInDialog: boolean }) {
return <React.Suspense fallback={<EffectOnly effect={() => {}} deps={[]} />}>
<Await
resolve={React.useMemo(() => Chat.getByIdOrThrow(getClient(), chatId), [chatId])}
children={(chatInfo: Chat) => <ChatFragment chatInfo={chatInfo} openedWithRouter={openedWithRouter} />} />
children={(chatInfo: Chat) => <ChatFragment chatInfo={chatInfo} openedInDialog={openedInDialog} />} />
</React.Suspense>
}