From 3f97e1e9ded48d6305fed820197ae6aedfdf5397 Mon Sep 17 00:00:00 2001 From: white <122345776@umail.ucc.ie> Date: Thu, 27 Feb 2025 11:17:15 +0000 Subject: [PATCH] UPDATE: readded contact information to footer --- frontend/src/components/Layout/Footer.tsx | 49 ++++++++++++++--------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/Layout/Footer.tsx b/frontend/src/components/Layout/Footer.tsx index bc3348f..57e5192 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,19 +37,30 @@ const Footer = () => { return ( ); }; -export default Footer; +export default Footer; \ No newline at end of file