diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 8e64880..c0018de 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -14,15 +14,6 @@ function App() { const [isLoading, setIsLoading] = useState(false); - useEffect(() => { - // Add query params to request url as users fill the form - setRequestUrl( - `${ - import.meta.env.VITE_FUNCTION_URL - }?url=${qrCodeUrl}&color=${color}&style=${style}`, - ); - }, [qrCodeUrl, color, style]); - const handleDownloadBtn = async () => { setIsLoading(true); @@ -34,6 +25,9 @@ function App() { }); try { + const requesturl = `${import.meta.env.VITE_FUNCTION_URL + }?url=${qrCodeUrl}&color=${color}&style=${style} + &code=${import.meta.env.VITE_FUNCTION_API_KEY}`; const res = await fetch(requesturl); const { qr_code_url: imgLink } = await res.json(); setImgUrl(imgLink);