彻底放弃客户端路由计划
This commit is contained in:
@@ -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>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user