diff --git a/frontend/src/components/Layout/DynamicPageContent.tsx b/frontend/src/components/Layout/DynamicPageContent.tsx index a757462..87f6f45 100644 --- a/frontend/src/components/Layout/DynamicPageContent.tsx +++ b/frontend/src/components/Layout/DynamicPageContent.tsx @@ -1,6 +1,7 @@ import React from "react"; import Navbar from "../Navigation/Navbar"; import { useSidebar } from "../../context/SidebarContext"; +import Footer from "./Footer"; interface DynamicPageContentProps extends React.HTMLProps { children: React.ReactNode; @@ -20,13 +21,16 @@ const DynamicPageContent: React.FC = ({ const { showSideBar } = useSidebar(); return ( -
+
{children}
diff --git a/frontend/src/components/Layout/Footer.tsx b/frontend/src/components/Layout/Footer.tsx index 5669add..8a0eaea 100644 --- a/frontend/src/components/Layout/Footer.tsx +++ b/frontend/src/components/Layout/Footer.tsx @@ -1,11 +1,17 @@ +import { Mail as MailIcon } from "lucide-react"; import { useState } from "react"; -import { Mail, Facebook, Twitter, Instagram, Linkedin } from "lucide-react"; const Footer = () => { const [email, setEmail] = useState(""); - const handleKeyDown = async (event) => { + const handleKeyDown = async (event: React.KeyboardEvent) => { if (event.key === "Enter") { + send_newsletter(); + } + } + + const send_newsletter = async () => { + if (email) { if (email.trim() === "") return; try { const response = await fetch(`/api/send_newsletter/${email}`, @@ -26,41 +32,26 @@ const Footer = () => { } catch (error) { console.error("Error subscribing:", error); } - } }; return ( -
+
{/* About Section */}

Gander

-

Your very favourite streaming service

+

+ Your very favourite streaming service +

{/* Office Section */}
-

Some Street

-

On Some Road

-

Near Some Country

-

That is definitely on Earth

-

- info@gander.com -

-

+69-280690345

-
- - {/* Links Section */} - {/* Newsletter Section */} @@ -75,23 +66,15 @@ const Footer = () => { onChange={(e) => setEmail(e.target.value)} onKeyDown={handleKeyDown} /> - handleKeyDown({ key: "Enter" })} /> + +
- {/* Social Icons */} -
- - - - -
+ {/* Footer Bottom */} +
+ Group 11
- - {/* Footer Bottom */} -
- Group 11 -
); }; diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx index 90c331c..bd36cc1 100644 --- a/frontend/src/pages/HomePage.tsx +++ b/frontend/src/pages/HomePage.tsx @@ -32,7 +32,7 @@ const HomePage: React.FC = ({ variant = "default" }) => { return (