mirror of
https://git.aria.coffee/BuyMyAria/aria.coffee.git
synced 2025-08-05 17:49:57 +00:00
Finally finish this enough to post
From here I will actually track changed with git but I just needed a base to work from. RIP this attomic ass commit
This commit is contained in:
parent
079e48c94e
commit
4bdb2ca436
48 changed files with 4693 additions and 657 deletions
17
src/components/Greeting.jsx
Normal file
17
src/components/Greeting.jsx
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { useState } from 'preact/hooks';
|
||||
|
||||
export default function Greeting({messages}) {
|
||||
|
||||
const randomMessage = () => messages[(Math.floor(Math.random() * messages.length))];
|
||||
|
||||
const [greeting, setGreeting] = useState(messages[0]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h3>{greeting}! Thank you for visiting!</h3>
|
||||
<button class="greetButton px-2 rounded-xl" onClick={() => setGreeting(randomMessage())}>
|
||||
New Greeting
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue