File tree Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Original file line number Diff line number Diff line change 1
1
import { Chat } from "@/components/chat" ;
2
2
import { ChatProvider } from "@/components/chat-provider" ;
3
+ import { Suspense } from "react" ;
3
4
4
5
export default function EmbedPage ( ) {
5
6
return (
6
- < ChatProvider >
7
- < div className = "flex flex-col h-svh" >
8
- < Chat />
9
- </ div >
10
- </ ChatProvider >
7
+ < Suspense
8
+ fallback = {
9
+ < div className = "text-center p-4 text-sm" > Loading chat interface...</ div >
10
+ }
11
+ >
12
+ < ChatProvider >
13
+ < div className = "flex flex-col h-svh" >
14
+ < Chat />
15
+ </ div >
16
+ </ ChatProvider >
17
+ </ Suspense >
11
18
) ;
12
19
}
Original file line number Diff line number Diff line change 1
1
import { Chat } from "@/components/chat" ;
2
2
import { ChatProvider } from "@/components/chat-provider" ;
3
3
import { Header } from "./header" ;
4
+ import { Suspense } from "react" ;
4
5
5
6
export default function Home ( ) {
6
7
return (
7
- < ChatProvider >
8
- < div className = "flex flex-col h-svh" >
9
- < Header />
10
- < Chat />
11
- </ div >
12
- </ ChatProvider >
8
+ < Suspense
9
+ fallback = {
10
+ < div className = "text-center p-4 text-sm" > Loading chat interface...</ div >
11
+ }
12
+ >
13
+ < ChatProvider >
14
+ < div className = "flex flex-col h-svh" >
15
+ < Header />
16
+ < Chat />
17
+ </ div >
18
+ </ ChatProvider >
19
+ </ Suspense >
13
20
) ;
14
21
}
You can’t perform that action at this time.
0 commit comments