import { useLocalStorage } from "react-use"; import { defaultHTML } from "@/lib/consts"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"; import { useUser } from "@/hooks/useUser"; export const LoginModal = ({ open, html, onClose, title = "Log In to use DeepSite for free", description = "Log In through your Hugging Face account to continue using DeepSite and increase your monthly free limit.", }: { open: boolean; html: string; onClose: React.Dispatch>; title?: string; description?: string; }) => { const { openLoginWindow } = useUser(); const [, setStorage] = useLocalStorage("html_content"); const handleClick = async () => { if (html !== defaultHTML) { setStorage(html); } openLoginWindow(); onClose(false); }; return (
💪
😎
🙌

{title}

{description}

); };