Implemented BingoController

This commit is contained in:
2023-11-03 00:03:08 +01:00
parent ae80324a46
commit c7ce85a07c
3 changed files with 25 additions and 3 deletions

View File

@@ -6,3 +6,9 @@
.td{
padding: 12px 16px;
}
.warning{
font-weight: bold;
color: red;
text-align: center;
}

View File

@@ -0,0 +1,17 @@
'use client';
import React from 'react'
import Bingo from './bingo.tsx'
import styles from './bingo.module.css'
export default function BingoController(){
const [size, setSize] = React.useState(5);
const [items, setItems] = React.useState(["Cloud", "Cyber", "Distruptive Technology", "AI", "Metaverse", "Gamification", "Web 3.0", "Industry 4.0", "Internet of Things", "Multiexperience", "Big Data", "Crypto", "[Insert bullshit here] as a service"]);
const sizeError = ((items.length % size) != 0);
return(
<>
{sizeError && <p className={styles.warning}>Warning: Mismatch between item count and size</p>}
<Bingo size={size} items={items}/>
</>
);
}