diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 56fa66e..d2ae09e 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -20,6 +20,34 @@ function useDarkMode() { return [dark, () => setDark((d) => !d)]; } +function useMobileCheck() { + const [isMobile, setIsMobile] = useState(() => window.innerWidth < 768); + useEffect(() => { + const mq = window.matchMedia('(max-width: 767px)'); + const handler = (e) => setIsMobile(e.matches); + mq.addEventListener('change', handler); + return () => mq.removeEventListener('change', handler); + }, []); + return isMobile; +} + +function MobileGate({ dark }) { + return ( +
+ Pokerface is designed for desktop use. Please open it on your PC or Mac for the best experience. +
+