diff --git a/client/src/App.tsx b/client/src/App.tsx index 4a6e948..6989cfa 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -27,9 +27,12 @@ import Toolbox from "./components/ControlWindows/Toolbox"; import Multiplayer from "./components/ControlWindows/Multiplayer"; import Leaderboard from "./components/ControlWindows/Leaderboard"; import GameAccount from "./components/ControlWindows/GameAccount"; +import MobileResponsiveWarning from "./components/MobileResponsiveWarning"; const App = () => { const [activeWindow, setActiveWindow] = useState(""); + const [showMobileResponsiveWarning, setShowMobileResponsiveWarning] = + useState(false); const [board, setBoard] = useState("classic"); const [gameState, setGameState] = useState({}); const [activeCategory, setActiveCategory] = useState("BOARD"); @@ -85,112 +88,130 @@ const App = () => { }); } } + + const trackScreenSize = () => { + setShowMobileResponsiveWarning(window.innerWidth < 845); + }; + + trackScreenSize(); + + window.addEventListener("resize", trackScreenSize); + + return () => { + window.removeEventListener("resize", trackScreenSize); + }; }, [options, setGameOptions]); return ( <> - - - - - -
- - StarkLudo is still in active development{" "} - -
-
-
-
+ {showMobileResponsiveWarning ? ( + + ) : ( + + + + + +
+ + StarkLudo is still in active development{" "} +
- - - - - -
-
+
+
+
+
+ + + + + +
-
-
+
+
+
+
+ + {/* */} + + + {activeWindow === "account" ? ( + setActiveWindow("")} + title="PROFILE" + subtitle="Your Profile Information" + > + + + ) : null} + + {activeWindow === "leaderboard" ? ( + setActiveWindow("")} + title="LEADERBOARD" + subtitle="Global Player Rankings" + > + + + ) : null} + + {activeWindow === "multiplayer" ? ( + setActiveWindow("")} + title="MULTIPLAYER" + subtitle="Choose An Account To Play With" + > + + + ) : null} + + {activeWindow === "toolbox" ? ( + setActiveWindow("")} + title="TOOLBOX" + subtitle="Get All Your Items And Settings Done" + > + + + ) : null} + + {activeWindow === "help" ? ( + setActiveWindow("")} + title="HELP" + subtitle="Get Guides, Tips, And Tricks Needed For A Successful Game" + > + + + ) : null} +
- - {/* */} - - - {activeWindow === "account" ? ( - setActiveWindow("")} - title="PROFILE" - subtitle="Your Profile Information" - > - - - ) : null} - - {activeWindow === "leaderboard" ? ( - setActiveWindow("")} - title="LEADERBOARD" - subtitle="Global Player Rankings" - > - - - ) : null} - - {activeWindow === "multiplayer" ? ( - setActiveWindow("")} - title="MULTIPLAYER" - subtitle="Choose An Account To Play With" - > - - - ) : null} - - {activeWindow === "toolbox" ? ( - setActiveWindow("")} - title="TOOLBOX" - subtitle="Get All Your Items And Settings Done" - > - - - ) : null} - - {activeWindow === "help" ? ( - setActiveWindow("")} - title="HELP" - subtitle="Get Guides, Tips, And Tricks Needed For A Successful Game" - > - - - ) : null} -
-
- -
-
-
- - - - - - + + +
+
+ + + + + + + )} ); }; diff --git a/client/src/components/MobileResponsiveWarning.tsx b/client/src/components/MobileResponsiveWarning.tsx new file mode 100644 index 0000000..05b7cb8 --- /dev/null +++ b/client/src/components/MobileResponsiveWarning.tsx @@ -0,0 +1,12 @@ +import "../styles/MobileResponsiveWarning.scss"; + +const MobileResponsiveWarning = () => { + return ( +
+ StarkLudo is not yet responsive on mobile devices. Please view on a + Desktop screen instead. +
+ ); +}; + +export default MobileResponsiveWarning; diff --git a/client/src/styles/MobileResponsiveWarning.scss b/client/src/styles/MobileResponsiveWarning.scss new file mode 100644 index 0000000..4dfd5d4 --- /dev/null +++ b/client/src/styles/MobileResponsiveWarning.scss @@ -0,0 +1,9 @@ +.mobile-responsive-warning { + color: white; + width: 100vw; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + padding: 10px +} \ No newline at end of file