From 9fcff05a7b6860fe9f157e51d57e3eade61105a5 Mon Sep 17 00:00:00 2001 From: Alex Frantz Date: Wed, 14 Aug 2024 02:42:21 -0400 Subject: [PATCH] haha funny quotes --- src/components/Footer.tsx | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index bfb1a82..a55c768 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -2,7 +2,20 @@ import { useState, useEffect } from 'react'; import { GitHub, LastFM, Twitter, Medal, Link } from './SocialIcons'; export default function Footer() { - const [mailState, setMailState] = useState(false); + const quoteArray = [ + "It works on my machine", + "Revert 'Revert 'Revert 'Revert Change'''", + "releases on Friday. refuses to elaborate. leaves.", + "this is so cooked", + "TypeScript: errors not for the weak, but for the spirited", + "Professional Production Tester", + "I break hearts to save lives. err.. something like that", + "The best error is the one that never shows up" + ] + + // states + const [mailState, setMailState] = useState(false); + const [ quote, setQuote ] = useState(quoteArray[Math.floor(Math.random() * quoteArray.length)]); useEffect(() => { if (mailState) { @@ -12,10 +25,17 @@ export default function Footer() { } }, [mailState]) + const drawNewQuote = () => { + setQuote(quoteArray[Math.floor(Math.random() * quoteArray.length)]); + } + return (

© {new Date().getFullYear()}, Alex Frantz. All Rights Reserved

All logos & images on this page belong to their respective owners.

+

{quote}

+ +
{ mailState ? (