26 lines
461 B
TypeScript
Raw Normal View History

2024-05-07 21:19:32 -07:00
"use client";
2024-05-03 13:53:21 -07:00
2024-05-07 21:19:32 -07:00
import { RoomProvider } from "@/liveblocks.config";
import { ClientSideSuspense } from "@liveblocks/react";
2024-05-03 13:53:21 -07:00
2024-05-03 14:27:45 -07:00
export function Room({
id,
children,
}: {
2024-05-07 21:19:32 -07: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-05-07 21:19:32 -07:00
);
2024-05-03 13:53:21 -07:00
}