import { useState } from "react"; import classNames from "classnames"; const downloadFile = (filename: string, content: string) => { const blob = new Blob([content], { type: "text/html" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); }; function DeployButton({ html, error: _error, // ✅ Renamed to "_error" to avoid unused warning }: { html: string; error?: boolean; }) { const [loading, setLoading] = useState(false); const handleDownload = () => { setLoading(true); setTimeout(() => { downloadFile("index.html", html); setLoading(false); }, 300); }; return (
); } export default DeployButton;