Skip to content

Commit

Permalink
download fixes for fabrication files (#74)
Browse files Browse the repository at this point in the history
* download fixes for fabrication files

* update easyeda with supplierPartNumber prop fix
  • Loading branch information
seveibar authored Oct 16, 2024
1 parent 0a4b3a1 commit 649cf5a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@
"@typescript/ata": "^0.9.7",
"@valtown/codemirror-ts": "^2.2.0",
"circuit-json": "^0.0.85",
"circuit-json-to-bom-csv": "^0.0.4",
"circuit-json-to-bom-csv": "^0.0.6",
"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",
"codemirror": "^6.0.1",
"date-fns": "^4.1.0",
"easyeda": "^0.0.48",
"easyeda": "^0.0.49",
"embla-carousel-react": "^8.3.0",
"fflate": "^0.8.2",
"file-saver": "^2.0.5",
Expand Down
14 changes: 10 additions & 4 deletions src/components/DownloadButtonAndMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -72,12 +72,18 @@ export function DownloadButtonAndMenu({
</DropdownMenuItem>
<DropdownMenuItem
className="text-xs"
onClick={() =>
downloadFabricationFiles({
onClick={async () => {
await downloadFabricationFiles({
circuitJson,
snippetUnscopedName: snippetUnscopedName || "snippet",
}).catch((error) => {
console.error(error)
toast({
title: "Error Downloading Fabrication Files",
description: error.toString(),
})
})
}
}}
>
<Download className="mr-1 h-3 w-3" />
<span className="flex-grow mr-6">Fabrication Files</span>
Expand Down
2 changes: 0 additions & 2 deletions src/pages/view-snippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ export const ViewSnippetPage = () => {
},
)

console.log({ snippet, snippetError, isLoading })

return (
<div>
<Header />
Expand Down

0 comments on commit 649cf5a

Please sign in to comment.