From c0d1c23145a43b90728c4c19fbb50ac3c21cf461 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Tue, 14 Nov 2023 15:55:51 -0500 Subject: [PATCH] add a download code button --- frontend/src/components/Preview.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/Preview.tsx b/frontend/src/components/Preview.tsx index ff22513..d5fa452 100644 --- a/frontend/src/components/Preview.tsx +++ b/frontend/src/components/Preview.tsx @@ -1,14 +1,14 @@ -import { useState } from 'react'; +import { useState } from "react"; interface Props { code: string; } function Preview({ code }: Props) { - const [blobUrl, setBlobUrl] = useState(''); + const [blobUrl, setBlobUrl] = useState(""); const createBlobUrl = () => { - const blob = new Blob([code], { type: 'text/html' }); + const blob = new Blob([code], { type: "text/html" }); const url = URL.createObjectURL(blob); setBlobUrl(url); }; @@ -21,9 +21,9 @@ function Preview({ code }: Props) { className="border-[5px] border-black rounded-[33px] p-4 shadow-lg transform scale-[0.8] origin-top-left w-[1280px] h-[832px]" > - + ); }