From 9ccccc194148ea6355e1dc864dd411657c48873d Mon Sep 17 00:00:00 2001 From: datalore Date: Fri, 3 Nov 2023 15:21:59 +0100 Subject: [PATCH] Added bingo controls --- src/app/components/bingo.tsx | 2 +- src/app/components/bingocontroller.tsx | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/components/bingo.tsx b/src/app/components/bingo.tsx index 29729c8..1e55923 100644 --- a/src/app/components/bingo.tsx +++ b/src/app/components/bingo.tsx @@ -12,7 +12,7 @@ export default function Bingo({size, items}: Props){ rows[i] = items.slice(i * size, (i + 1) * size); } return( - +
{rows.map((item, index) => )} diff --git a/src/app/components/bingocontroller.tsx b/src/app/components/bingocontroller.tsx index a1796c9..7f93cf5 100644 --- a/src/app/components/bingocontroller.tsx +++ b/src/app/components/bingocontroller.tsx @@ -5,12 +5,22 @@ import Bingo from './bingo.tsx' export default function BingoController(){ const [size, setSize] = React.useState(5); - const [items, setItems] = React.useState(["Cloud", "Cyber", "Distruptive Technology", "AI", "Metaverse", "Gamification", "Web 2.0/3.0", "Industry 4.0", "Internet of Things", "Multiexperience", "Big Data", "Crypto", "[Insert bullshit here] as a service", "Emerging Market", "Streamline"]); + const buzzwords = ["Cloud", "Cyber", "Distruptive Technology", "AI", "Metaverse", "Gamification", "Web 2.0/3.0", "Industry 4.0", "Internet of Things", "Multiexperience", "Big Data", "Crypto", "[Insert bullshit here] as a service", "Emerging Market", "Streamline"]; + const [items, setItems] = React.useState(buzzwords); const sizeError = ((items.length % size) != 0); return( <>
+
+ setSize(s)}/> +
+ 3x3 + 4x4 + 5x5 +
+ Regenerate +
{sizeError &&
Warning: Mismatch between item count and size
}