Fix GameOfSim component layout and add full-screen support

- Add showSocialShare prop to GameOfSim component for conditional social sharing
- Create GameOfSimPage.tsx for standalone access without header/footer
- Create GameOfSimGreenScreen.tsx for green screen mode
- Add routing for /game-of-sim and /game-of-sim/:mode
- Fix GamesGallery to conditionally show header/footer (only in gallery view)
- Update Games.tsx to remove Layout wrapper for proper conditional rendering
- Add unique ID to social share URL for copy link functionality
- Ensure consistent behavior with other interactive components
This commit is contained in:
Neeldhara Misra 2025-07-20 09:32:08 +05:30
parent 8d84ac0476
commit 85a8298352
6 changed files with 105 additions and 65 deletions

View file

@ -17,6 +17,8 @@ import BinaryNumberGamePage from "./pages/BinaryNumberGamePage";
import BinaryNumberGameGreenScreen from "./pages/BinaryNumberGameGreenScreen";
import BinarySearchTrickPage from "./pages/BinarySearchTrickPage";
import BinarySearchTrickGreenScreen from "./pages/BinarySearchTrickGreenScreen";
import GameOfSimGreenScreen from "./pages/GameOfSimGreenScreen";
import GameOfSimPage from "./pages/GameOfSimPage";
import Foundations from "./pages/theme-pages/discrete-math/Foundations";
import Proofs from "./pages/theme-pages/discrete-math/Proofs";
import Counting from "./pages/theme-pages/discrete-math/Counting";
@ -60,6 +62,8 @@ const App = () => (
<Route path="/binary-number-game/:mode" element={<BinaryNumberGameGreenScreen />} />
<Route path="/binary-search-trick" element={<BinarySearchTrickPage />} />
<Route path="/binary-search-trick/:mode" element={<BinarySearchTrickGreenScreen />} />
<Route path="/game-of-sim" element={<GameOfSimPage />} />
<Route path="/game-of-sim/:mode" element={<GameOfSimGreenScreen />} />
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
<Route path="*" element={<NotFound />} />