"use client"; import { useCallback, useEffect, useState } from "react"; import { CalendarPlus, Copy, Check, Download, ExternalLink, X } from "lucide-react"; const siteUrl = typeof window !== "undefined" ? window.location.origin : process.env.NEXT_PUBLIC_SITE_URL || "https://belgianbitcoinembassy.org"; function Dialog({ onClose }: { onClose: () => void }) { const icsUrl = `${siteUrl}/calendar.ics`; const webcalUrl = icsUrl.replace(/^https?:\/\//, "webcal://"); const [copied, setCopied] = useState(false); useEffect(() => { const onKey = (e: KeyboardEvent) => { if (e.key === "Escape") onClose(); }; window.addEventListener("keydown", onKey); return () => window.removeEventListener("keydown", onKey); }, [onClose]); const handleCopy = async () => { await navigator.clipboard.writeText(icsUrl); setCopied(true); setTimeout(() => setCopied(false), 2000); }; return (
Subscribe to this feed to get all public Belgian Bitcoin Embassy meetups in your calendar. New events are added automatically.