haha funny quotes

This commit is contained in:
2024-08-14 02:42:21 -04:00
parent 6bd1718dc9
commit 9fcff05a7b
+21 -1
View File
@@ -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<boolean>(false);
const [ quote, setQuote ] = useState<string>(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 (
<div className="lg:w-1/2 bg-gray-500 md:w-full mx-auto rounded-t-lg text-center p-4 select-none">
<h1 className="font-bold">&copy; {new Date().getFullYear()}, Alex Frantz. All Rights Reserved</h1>
<p>All logos & images on this page belong to their respective owners.</p>
<p className="opacity-50 italic" onClick={drawNewQuote}>{quote}</p>
<hr className="my-2 w-1/2 mx-auto" />
{
mailState ? (