init. moved lil website for madeline into fuse project so I can write apis in here
This commit is contained in:
35
src/app/page.tsx
Executable file
35
src/app/page.tsx
Executable file
@@ -0,0 +1,35 @@
|
||||
"use client";
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
const interestingYes = () => {
|
||||
const yesArray = [
|
||||
"Absolutely, yes.",
|
||||
"Without a doubt.",
|
||||
"Of course.",
|
||||
"Definitely.",
|
||||
"Obviously!",
|
||||
"Certainly!",
|
||||
"Positively.",
|
||||
"100%",
|
||||
];
|
||||
return yesArray[Math.floor(Math.random() * yesArray.length)];
|
||||
}
|
||||
|
||||
export default function HomePage() {
|
||||
const [currentText, setCurrentText] = useState("");
|
||||
useEffect(() => {
|
||||
setCurrentText(interestingYes() ?? "Absolutely, yes.");
|
||||
}, []);
|
||||
const handleClick = () => {
|
||||
setCurrentText(interestingYes() ?? "Absolutely, yes.");
|
||||
};
|
||||
return (
|
||||
<main className="flex min-h-screen flex-col items-center justify-center
|
||||
bg-gradient-to-b from-pink-500 to-orange-400 text-white cursor-pointer">
|
||||
<h3 className="text-5xl font-extrabold tracking-tight
|
||||
text-white sm:text-[5rem] text-center" onClick={handleClick}>
|
||||
{currentText}
|
||||
</h3>
|
||||
</main>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user