25 lines
400 B
TypeScript
Raw Permalink Normal View History

2024-10-21 13:57:45 -06:00
"use client"
2024-05-03 13:53:21 -07:00
2024-10-21 13:57:45 -06:00
import { RoomProvider } from "@/liveblocks.config"
2024-05-03 13:53:21 -07:00
2024-05-03 14:27:45 -07:00
export function Room({
id,
children,
}: {
2024-10-21 13:57:45 -06:00
id: string
children: React.ReactNode
2024-05-03 14:27:45 -07:00
}) {
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>
2024-10-21 13:57:45 -06:00
)
2024-05-03 13:53:21 -07:00
}