start disable modal ui + logic
This commit is contained in:
33
frontend/components/editor/live/disableModal.tsx
Normal file
33
frontend/components/editor/live/disableModal.tsx
Normal file
@ -0,0 +1,33 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog";
|
||||
|
||||
import { ChevronRight, FileStack, Globe, TextCursor } from "lucide-react";
|
||||
|
||||
export default function DisableAccessModal({
|
||||
open,
|
||||
setOpen,
|
||||
message,
|
||||
}: {
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
message: string;
|
||||
}) {
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Live Collaboration Disabled</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="text-sm text-muted-foreground">{message}</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
@ -1,15 +1,14 @@
|
||||
"use client"
|
||||
"use client";
|
||||
|
||||
import { RoomProvider } from "@/liveblocks.config"
|
||||
import { ClientSideSuspense } from "@liveblocks/react"
|
||||
import Loading from "../loading"
|
||||
import { RoomProvider } from "@/liveblocks.config";
|
||||
import { ClientSideSuspense } from "@liveblocks/react";
|
||||
|
||||
export function Room({
|
||||
id,
|
||||
children,
|
||||
}: {
|
||||
id: string
|
||||
children: React.ReactNode
|
||||
id: string;
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<RoomProvider
|
||||
@ -22,5 +21,5 @@ export function Room({
|
||||
{children}
|
||||
{/* </ClientSideSuspense> */}
|
||||
</RoomProvider>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user