diff --git a/src/app/components/bingocontroller.tsx b/src/app/components/bingocontroller.tsx index 059c788..04ab6bf 100644 --- a/src/app/components/bingocontroller.tsx +++ b/src/app/components/bingocontroller.tsx @@ -15,6 +15,24 @@ function FisherYatesShuffle(array:string[]):string[]{ } export default function BingoController({buzzwords} : {buzzwords?: string[]}){ + const [orientation, setOrientation] = React.useState(""); + React.useEffect(()=>{ + function updateOrientation() + { + setOrientation(window.screen.orientation.type); + } + + // init + updateOrientation(); + + window.addEventListener("orientationchange", updateOrientation); + + // destructor + return () => { + window.removeEventListener("orientationchange", updateOrientation); + } + }); + const [size, setSize] = React.useState(5); if(buzzwords == undefined || buzzwords.length < 1) buzzwords = ["Cloud", "Cyber-[Something]", "Distrupt[ive]", "AI", "Meta [Something]", "Gamification", "Web 2.0/3.0", "Industry 4.0", "Internet of Things", "Multiexperience", "Big Data", "Crypto", "[Something] as a service", "Emerging [Something]", "Streamline", "Ecosystem", "Leverage", "Outside the Box", "Pivot", "Strategic", "Agile", "Smart Tech", "Data Warehouse", "Actionable Insights", "Holistic Approach", "Digital Transformation", "Growth Hacking"]; const [items, setItems] = React.useState(buzzwords); @@ -22,6 +40,10 @@ export default function BingoController({buzzwords} : {buzzwords?: string[]}){ return( <>