diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx new file mode 100644 index 0000000..40b3fd3 --- /dev/null +++ b/src/components/Footer.tsx @@ -0,0 +1,90 @@ +import { useState } from "react"; +import { Link } from "react-router-dom"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Twitter, Instagram, Facebook, Youtube } from "lucide-react"; +import { toast } from "sonner"; +import { useSaasMutation } from "@/hooks/use-tygarun"; + +export default function Footer() { + const [email, setEmail] = useState(""); + const { mutate: subscribeNewsletter, loading: subscribing } = useSaasMutation("email", "/send/newsletter-confirm"); + const handleSubscribe = async () => { + if (!email) return; + try { await subscribeNewsletter({ email }); setEmail(""); toast.success("Subscribed!"); } + catch { toast.error("Could not subscribe. Please try again."); } + }; + const sections = [ + { label: "Culture", to: "/category" }, + { label: "Style", to: "/category" }, + { label: "Technology", to: "/category" }, + { label: "Travel", to: "/category" }, + { label: "Food", to: "/category" }, + { label: "Opinion", to: "/category" }, + ]; + const about = [ + { label: "About Us", to: "/contributors" }, + { label: "Contributors", to: "/contributors" }, + { label: "Careers", to: "/" }, + { label: "Contact", to: "/" }, + ]; + const follow = [ + { label: "Twitter", icon: Twitter, href: "#" }, + { label: "Instagram", icon: Instagram, href: "#" }, + { label: "Facebook", icon: Facebook, href: "#" }, + { label: "YouTube", icon: Youtube, href: "#" }, + ]; + + return ( + + ); +} \ No newline at end of file