From 8db3bead13441a5882d8689dfc6a9f09c82375d9 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 25 Mar 2026 16:47:22 +0100 Subject: feat: masks, properties refactor, shaders, storage migrations, and more --- apps/web/src/components/editor/export-button.tsx | 63 ++++++++++++++---------- 1 file changed, 37 insertions(+), 26 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 ddf8308d..ec39e7e6 100644 --- a/apps/web/src/components/editor/export-button.tsx +++ b/apps/web/src/components/editor/export-button.tsx @@ -14,20 +14,24 @@ import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; import { Progress } from "@/components/ui/progress"; import { Checkbox } from "@/components/ui/checkbox"; import { cn } from "@/utils/ui"; -import { getExportMimeType, getExportFileExtension, downloadBuffer } from "@/lib/export"; +import { + getExportMimeType, + getExportFileExtension, + downloadBuffer, +} from "@/lib/export"; import { Check, Copy, Download, RotateCcw } from "lucide-react"; import { EXPORT_FORMAT_VALUES, EXPORT_QUALITY_VALUES, type ExportFormat, type ExportQuality, -} from "@/types/export"; +} from "@/lib/export"; import { Section, SectionContent, SectionHeader, SectionTitle, -} from "@/components/editor/panels/properties/section"; +} from "@/components/section"; import { useEditor } from "@/hooks/use-editor"; import { DEFAULT_EXPORT_OPTIONS } from "@/constants/export-constants"; @@ -42,8 +46,8 @@ function isExportQuality(value: string): value is ExportQuality { export function ExportButton() { const [isExportPopoverOpen, setIsExportPopoverOpen] = useState(false); const editor = useEditor(); - - const hasProject = !!editor.project.getActiveOrNull(); + const activeProject = useEditor((e) => e.project.getActiveOrNull()); + const hasProject = !!activeProject; const handlePopoverOpenChange = ({ open }: { open: boolean }) => { if (!open) { @@ -54,7 +58,10 @@ export function ExportButton() { }; return ( - handlePopoverOpenChange({ open })}> + handlePopoverOpenChange({ open })} + >