diff --git a/frontend/components/editor/navbar/downloadButton.tsx b/frontend/components/editor/navbar/downloadButton.tsx
index 6b2c9c7..c036ffc 100644
--- a/frontend/components/editor/navbar/downloadButton.tsx
+++ b/frontend/components/editor/navbar/downloadButton.tsx
@@ -3,7 +3,7 @@ import { useSocket } from "@/context/SocketContext"
import { Button } from "@/components/ui/button"
import { Download } from "lucide-react"
-export default function DownloadButton() {
+export default function DownloadButton({ name }: { name: string }) {
const { socket } = useSocket()
const handleDownload = async () => {
@@ -18,12 +18,13 @@ export default function DownloadButton() {
const url = window.URL.createObjectURL(blob)
const a = document.createElement('a')
a.href = url
- a.download = 'sandbox-files.zip'
+ a.download = `${name}.zip`
a.click()
window.URL.revokeObjectURL(url)
})
}
+
return (
-
- >
+ >
) : null}