click on splash quote to refresh quote
This commit is contained in:
@@ -6,10 +6,13 @@ import config from "../data/config.json";
|
||||
|
||||
const PageIndex = () => {
|
||||
const [splash, setSplash] = useState("");
|
||||
useEffect(() => {
|
||||
function randomizeSplash(): void {
|
||||
setSplash(
|
||||
config.splashes[Math.floor(Math.random() * config.splashes.length)].body
|
||||
);
|
||||
}
|
||||
useEffect(() => {
|
||||
randomizeSplash();
|
||||
}, []);
|
||||
const welcometext: string = "Witamy na witrynie internetowej Gractwa."; // Mamy nadzieję że odnajdziesz czego szukasz, zbłąkana duszo.";
|
||||
return (
|
||||
@@ -17,7 +20,12 @@ const PageIndex = () => {
|
||||
<SEO />
|
||||
<div className={styles.hero}>
|
||||
<div className={styles.heroinside}>
|
||||
<h1>„{splash || "..."}”</h1>
|
||||
<h1
|
||||
onClick={randomizeSplash}
|
||||
className={styles.h1clicktorefreshsplash}
|
||||
>
|
||||
„{splash || "..."}”
|
||||
</h1>
|
||||
<p>{welcometext}</p>
|
||||
<br />
|
||||
<p>Warto naznaczyć, że strona jest w trakcie remontu.</p>
|
||||
|
||||
Reference in New Issue
Block a user