"use client"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { ChevronRight, FileStack, Globe, Loader2, TextCursor, } from "lucide-react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; export default function DisableAccessModal({ open, setOpen, message, }: { open: boolean; setOpen: (open: boolean) => void; message: string; }) { const router = useRouter(); useEffect(() => { if (open) { const timeout = setTimeout(() => { router.push("/dashboard"); }, 5000); return () => clearTimeout(timeout); } }, []); return ( Live Collaboration Disabled
{message}
Redirecting you to dashboard...
); }