From fca99d6126c31fbb18ed9f1034cee6f940b040e8 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Tue, 10 Feb 2026 16:28:21 +0100 Subject: refactor --- apps/web/src/components/editor/export-button.tsx | 51 ++++++++---------------- 1 file changed, 16 insertions(+), 35 deletions(-) (limited to 'apps/web/src/components/editor/export-button.tsx') diff --git a/apps/web/src/components/editor/export-button.tsx b/apps/web/src/components/editor/export-button.tsx index 942efcff..f39c18e2 100644 --- a/apps/web/src/components/editor/export-button.tsx +++ b/apps/web/src/components/editor/export-button.tsx @@ -15,7 +15,7 @@ import { Progress } from "@/components/ui/progress"; import { Checkbox } from "@/components/ui/checkbox"; import { cn } from "@/utils/ui"; import { getExportMimeType, getExportFileExtension } from "@/lib/export"; -import { Check, Copy, Download, RotateCcw, X } from "lucide-react"; +import { Check, Copy, Download, RotateCcw } from "lucide-react"; import { EXPORT_FORMAT_VALUES, EXPORT_QUALITY_VALUES, @@ -44,9 +44,7 @@ export function ExportButton() { type="button" className={cn( "flex items-center gap-1.5 rounded-md bg-[#38BDF8] px-[0.12rem] py-[0.12rem] text-white", - hasProject - ? "cursor-pointer" - : "cursor-not-allowed opacity-50", + hasProject ? "cursor-pointer" : "cursor-not-allowed opacity-50", )} onClick={hasProject ? handleExport : undefined} disabled={!hasProject} @@ -141,20 +139,12 @@ function ExportPopover({ } }; - const handleClose = () => { - if (!isExporting) { - onOpenChange(false); - setExportResult(null); - setProgress(0); - } - }; - const handleCancel = () => { cancelRequestedRef.current = true; }; return ( - + {exportResult && !exportResult.success ? ( ) : ( <> -
-

+
+

{isExporting ? "Exporting project" : "Export project"}

-
{!isExporting && ( <> -
+
- + { @@ -237,11 +220,7 @@ function ExportPopover({ - +
- +
+ +
)} {isExporting && ( -
+

-- cgit v1.3.1