diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx new file mode 100644 index 0000000..9c8d7ac --- /dev/null +++ b/src/pages/Index.tsx @@ -0,0 +1,198 @@ +import { useState } from "react"; +import { toast } from "sonner"; +import { Link } from "react-router-dom"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Badge } from "@/components/ui/badge"; +import { Headphones, MapPin, Calendar, Clock, Play, ArrowRight, Send, Disc3, Music } from "lucide-react"; +import { useSaasMutation } from "@/hooks/use-tygarun"; +import Header from "@/components/Header"; +import Footer from "@/components/Footer"; + +const discography = [ + { title: "Chromatic Abyss", year: "2026", gradient: "from-purple-600 to-fuchsia-500" }, + { title: "Midnight Circuits", year: "2024", gradient: "from-fuchsia-500 to-pink-500" }, + { title: "Phantom Frequencies", year: "2022", gradient: "from-violet-600 to-purple-500" }, + { title: "Genesis Protocol", year: "2020", gradient: "from-indigo-600 to-violet-500" }, +]; + +const tourDates = [ + { date: "Apr 28, 2026", city: "Los Angeles, CA", venue: "The Wiltern", soldOut: false }, + { date: "May 3, 2026", city: "New York, NY", venue: "Brooklyn Steel", soldOut: true }, + { date: "May 10, 2026", city: "Chicago, IL", venue: "Metro Chicago", soldOut: false }, + { date: "May 17, 2026", city: "Austin, TX", venue: "Emos Austin", soldOut: false }, +]; + +const featuredTracks = [ + { num: "01", title: "Neon Requiem", duration: "4:12" }, + { num: "02", title: "Violet Horizon", duration: "3:48" }, + { num: "03", title: "Pulse Decay", duration: "5:01" }, + { num: "04", title: "Afterglow", duration: "3:33" }, +]; + +export default function IndexPage() { + const { mutate: buyTicket } = useSaasMutation("event-ticketing", "/checkout"); + const { mutate: subscribe } = useSaasMutation("email", "/send/newsletter-confirm"); + const [joining, setJoining] = useState(false); + + const handleTickets = async (show: { venue: string; city: string }) => { + try { + const res = await buyTicket({ plan: show.venue, city: show.city }); + if (res?.url && res.url !== "#") { window.location.href = res.url; return; } + toast.success(`Tickets reserved for \${show.venue}`); + } catch { + toast.error("Could not start checkout. Please try again."); + } + }; + + const handleJoin = async (e: React.FormEvent) => { + e.preventDefault(); + const form = e.currentTarget as HTMLFormElement; + const email = (new FormData(form).get("email") as string) || ""; + setJoining(true); + try { + await subscribe({ email }); + toast.success("Welcome to the fan club!"); + form.reset(); + } catch { + toast.error("Could not subscribe. Please try again."); + } finally { + setJoining(false); + } + }; + + return ( +
+
+ + {/* Hero */} +
+
+
+
+
+
+
+ Electronic / Synthwave +

Nova Eclipse

+

Where neon dreams meet sonic landscapes. New album out now.

+
+ + +
+
+
+ + {/* Latest Release */} +
+
+

Latest Release

+

The new album everyone is talking about.

+
+
+ +
+
+ March 2026 +

Chromatic Abyss

+

A 12-track journey through pulsing synths, haunting vocals, and cinematic soundscapes that blur the line between reality and reverie.

+
+ {featuredTracks.map((t) => ( +
+ + {t.num} + {t.title} + {t.duration} +
+ ))} +
+ +
+
+
+
+ + {/* Discography Preview */} +
+
+
+

Discography

+ +
+
+ {discography.map((a, i) => ( + +
+ +
+ +

{a.title}

+

{a.year}

+ +
+
+ ))} +
+
+
+ + {/* Tour Dates */} +
+
+
+

On Tour

+ +
+
+ {tourDates.map((show, i) => ( + + +
+ + {show.date} +
+
+
{show.city}
+
{show.venue}
+
+ {show.soldOut ? ( + Sold Out + ) : ( + + )} +
+
+ ))} +
+
+
+ + {/* Newsletter */} +
+
+

Join the Fan Club

+

Get first access to new releases, exclusive merch drops, and pre-sale tour tickets.

+
+ + +
+
+
+ +
+ ); +} \ No newline at end of file