From 058637e589875230ebd35bcc61dc7014fd6ddf60 Mon Sep 17 00:00:00 2001 From: Alex Frantz Date: Wed, 23 Jul 2025 01:42:58 -0400 Subject: [PATCH] go bills --- src/components/Countdown.tsx | 68 ++++++++++++++++++++++++++++++++++ src/components/Layout.tsx | 2 + src/components/RandomLyric.tsx | 4 ++ src/pages/App.tsx | 2 +- 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 src/components/Countdown.tsx diff --git a/src/components/Countdown.tsx b/src/components/Countdown.tsx new file mode 100644 index 0000000..816e1ba --- /dev/null +++ b/src/components/Countdown.tsx @@ -0,0 +1,68 @@ +import { useEffect, useRef } from "react"; + +export default function Countdown() { + const countdownRef = useRef(null); + const audioRef = useRef(null); + + useEffect(() => { + const dateOfStart = new Date("Sep 7, 2025 20:15:00").getTime(); + + setInterval(() => { + const currentDate = new Date().getTime(); + const difference = dateOfStart - currentDate; + + const days = Math.floor(difference / (1000 * 60 * 60 * 24)); + const hours = Math.floor( + difference / (1000 * 60 * 60 * 24) / (1000 * 60 * 60) + ); + const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60)); + const seconds = Math.floor((difference % (1000 * 60)) / 1000); + + if (countdownRef?.current) { + let timerString = ""; + if (days) timerString += `${days}d, `; + if (hours) timerString += `${hours}h, `; + if (minutes) timerString += `${minutes}m, `; + if (seconds) timerString += `${seconds}s`; + + if ( + days <= 0 && + hours <= 0 && + minutes <= 0 && + seconds <= 0 && + timerString === "" + ) { + timerString = "GO BILLS"; + } + + countdownRef.current.innerText = timerString; + } + }, 1000); + }, []); + + return ( +
+
+ { + if (audioRef?.current) { + audioRef.current.play(); + } + }} + width="50" + height="50" + className="hover:cursor-pointer" + src={"https://storage.alexav.gg/content/bills.png"} + /> +

+
+
+ ); +} diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 6a600cb..5411e83 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -1,6 +1,7 @@ import { useState, useEffect, type ReactNode } from "react"; import { Flashlight, FlashlightOff } from "lucide-react"; import SplatterImage from "../assets/splatter.png"; +import Countdown from "./Countdown"; export default function Layout({ children }: { children: ReactNode }) { const [pointerPosition, setPointerPosition] = useState({ x: 500, y: 500 }); @@ -139,6 +140,7 @@ export default function Layout({ children }: { children: ReactNode }) {

welcome !

+ {children} diff --git a/src/components/RandomLyric.tsx b/src/components/RandomLyric.tsx index be0f8ac..5ee088f 100644 --- a/src/components/RandomLyric.tsx +++ b/src/components/RandomLyric.tsx @@ -36,6 +36,10 @@ const lyrics: LyricItem[] = [ string: "i wrote a song for you", url: "https://open.spotify.com/track/744zwLqGKbOZW3RnxkRfHE?si=4d2230964fcc4f2f", }, + { + string: "oh madeline, how you been?", + url: "https://open.spotify.com/track/2DDo2QqElDO9PgOHeGtQiy?si=0fdcbaeb64694249", + }, ]; type LyricItem = { diff --git a/src/pages/App.tsx b/src/pages/App.tsx index 53cf3b6..3eacf7c 100644 --- a/src/pages/App.tsx +++ b/src/pages/App.tsx @@ -41,7 +41,7 @@ export default function App() { href="https://medal.tv" target="_blank" rel="noopener noreferrer" - className="hover:underline" + className="hover:underline text-[#bff83e]" > medal.tv