From 83cf913ab8c6e51ee1d9e18f017964b954425194 Mon Sep 17 00:00:00 2001 From: jyswee Date: Thu, 23 Jul 2026 22:13:32 +0000 Subject: [PATCH] Seed: music template (13 files) --- src/components/Footer.tsx | 78 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 src/components/Footer.tsx diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx new file mode 100644 index 0000000..c59b721 --- /dev/null +++ b/src/components/Footer.tsx @@ -0,0 +1,78 @@ +import { toast } from "sonner"; +import { Link } from "react-router-dom"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Music, Send, Youtube, Twitter, Instagram } from "lucide-react"; +import { useSaasMutation } from "@/hooks/use-tygarun"; + +export default function Footer() { + const { mutate: subscribe } = useSaasMutation("email", "/send/newsletter-confirm"); + + const handleSubscribe = async (e: React.FormEvent) => { + e.preventDefault(); + const form = e.currentTarget as HTMLFormElement; + const email = (new FormData(form).get("email") as string) || ""; + try { + await subscribe({ email }); + toast.success("You are on the list!"); + form.reset(); + } catch { + toast.error("Could not subscribe. Please try again."); + } + }; + + const streamLinks = [ + { name: "Spotify", href: "#" }, + { name: "Apple Music", href: "#" }, + { name: "YouTube Music", href: "#" }, + { name: "SoundCloud", href: "#" }, + ]; + + return ( + + ); +} \ No newline at end of file