import React, { useState, useEffect } from 'react' import Tile from './Tile' import CategoryTitle from './CategoryTitle' export default function Board({ data, round, score, setScore }) { const categories = data.categories.slice(0, 6) const values = round === 'jeopardy' ? [200, 400, 600, 800, 1000] : [400, 800, 1200, 1600, 2000] const [isMobile, setIsMobile] = useState(false) const [showScrollHint, setShowScrollHint] = useState(false) useEffect(() => { const checkMobile = () => { // Check if screen width is below 640px (Tailwind's sm breakpoint) const mobile = window.innerWidth < 640 setIsMobile(mobile) } checkMobile() window.addEventListener('resize', checkMobile) // Show hint on mobile after a short delay let hintTimer let autoHideTimer if (window.innerWidth < 640) { hintTimer = setTimeout(() => { setShowScrollHint(true) // Auto-hide after 5 seconds autoHideTimer = setTimeout(() => setShowScrollHint(false), 5000) }, 1000) } return () => { window.removeEventListener('resize', checkMobile) if (hintTimer) clearTimeout(hintTimer) if (autoHideTimer) clearTimeout(autoHideTimer) } }, []) return (