From 40d40da956116b74d7e8065febf8280c028ca28b Mon Sep 17 00:00:00 2001 From: JustIceO7 Date: Thu, 27 Feb 2025 04:48:49 +0000 Subject: [PATCH] CHANGE: Changed layout and content of footer --- frontend/src/components/Layout/Footer.tsx | 47 ++++++++--------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/frontend/src/components/Layout/Footer.tsx b/frontend/src/components/Layout/Footer.tsx index 8a0eaea..bc3348f 100644 --- a/frontend/src/components/Layout/Footer.tsx +++ b/frontend/src/components/Layout/Footer.tsx @@ -14,18 +14,18 @@ const Footer = () => { if (email) { if (email.trim() === "") return; try { - const response = await fetch(`/api/send_newsletter/${email}`, - { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - }); + const response = await fetch(`/api/send_newsletter/${email}`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + }); if (!response.ok) { throw new Error("Failed to subscribe"); } - + setEmail(""); alert("Successfully added to newsletter"); @@ -37,30 +37,19 @@ const Footer = () => { return ( );