27 lines
488 B
TypeScript
Raw Normal View History

2024-05-03 13:53:21 -07:00
"use client"
import { RoomProvider } from "@/liveblocks.config"
import { ClientSideSuspense } from "@liveblocks/react"
2024-05-05 14:33:09 -07:00
import Loading from "../loading"
2024-05-03 13:53:21 -07:00
2024-05-03 14:27:45 -07:00
export function Room({
id,
children,
}: {
id: string
children: React.ReactNode
}) {
2024-05-03 13:53:21 -07:00
return (
<RoomProvider
2024-05-03 14:27:45 -07:00
id={id}
2024-05-03 13:53:21 -07:00
initialPresence={{
cursor: null,
}}
>
2024-05-05 14:33:09 -07:00
{/* <ClientSideSuspense fallback={<Loading />}> */}
{children}
{/* </ClientSideSuspense> */}
2024-05-03 13:53:21 -07:00
</RoomProvider>
)
}