diff --git a/bun.lockb b/bun.lockb index c03398b9..f16dc0fc 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 903f82fa..7ab5b4a6 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "circuit-json": "^0.0.85", "circuit-json-to-bom-csv": "^0.0.4", "circuit-json-to-gerber": "^0.0.12", - "circuit-json-to-pnp-csv": "^0.0.5", + "circuit-json-to-pnp-csv": "^0.0.6", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cmdk": "1.0.0", diff --git a/src/components/DownloadButtonAndMenu.tsx b/src/components/DownloadButtonAndMenu.tsx index 5b44d55d..064b4aef 100644 --- a/src/components/DownloadButtonAndMenu.tsx +++ b/src/components/DownloadButtonAndMenu.tsx @@ -8,7 +8,7 @@ import { import { Button } from "@/components/ui/button" import { Download, ChevronDown } from "lucide-react" import { downloadCircuitJson } from "@/lib/download-fns/download-circuit-json-fn" -import { useNotImplementedToast } from "@/hooks/use-toast" +import { toast, useNotImplementedToast } from "@/hooks/use-toast" import { downloadFabricationFiles } from "@/lib/download-fns/download-fabrication-files" import { AnyCircuitElement } from "circuit-json" @@ -72,12 +72,18 @@ export function DownloadButtonAndMenu({ - downloadFabricationFiles({ + onClick={async () => { + await downloadFabricationFiles({ circuitJson, snippetUnscopedName: snippetUnscopedName || "snippet", + }).catch((error) => { + console.error(error) + toast({ + title: "Error Downloading Fabrication Files", + description: error.toString(), + }) }) - } + }} > Fabrication Files diff --git a/src/pages/view-snippet.tsx b/src/pages/view-snippet.tsx index f96cd07e..c7c04546 100644 --- a/src/pages/view-snippet.tsx +++ b/src/pages/view-snippet.tsx @@ -22,8 +22,6 @@ export const ViewSnippetPage = () => { }, ) - console.log({ snippet, snippetError, isLoading }) - return (