haha funny quotes
This commit is contained in:
@@ -2,7 +2,20 @@ import { useState, useEffect } from 'react';
|
|||||||
import { GitHub, LastFM, Twitter, Medal, Link } from './SocialIcons';
|
import { GitHub, LastFM, Twitter, Medal, Link } from './SocialIcons';
|
||||||
|
|
||||||
export default function Footer() {
|
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(() => {
|
useEffect(() => {
|
||||||
if (mailState) {
|
if (mailState) {
|
||||||
@@ -12,10 +25,17 @@ export default function Footer() {
|
|||||||
}
|
}
|
||||||
}, [mailState])
|
}, [mailState])
|
||||||
|
|
||||||
|
const drawNewQuote = () => {
|
||||||
|
setQuote(quoteArray[Math.floor(Math.random() * quoteArray.length)]);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="lg:w-1/2 bg-gray-500 md:w-full mx-auto rounded-t-lg text-center p-4 select-none">
|
<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">© {new Date().getFullYear()}, Alex Frantz. All Rights Reserved</h1>
|
<h1 className="font-bold">© {new Date().getFullYear()}, Alex Frantz. All Rights Reserved</h1>
|
||||||
<p>All logos & images on this page belong to their respective owners.</p>
|
<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 ? (
|
mailState ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user