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

@ -0,0 +1,18 @@
import { useParams } from 'react-router-dom';
import GameOfSim from '@/components/GameOfSim';
import GreenScreenWrapper from '@/components/GreenScreenWrapper';
const GameOfSimGreenScreen = () => {
const { mode } = useParams<{ mode: 'gs-lite' | 'gs-dark' }>();
const greenScreenMode = mode === 'gs-dark' ? 'dark' : 'lite';
return (
<GreenScreenWrapper mode={greenScreenMode}>
<div className="space-y-6">
<GameOfSim showSocialShare={false} />
</div>
</GreenScreenWrapper>
);
};
export default GameOfSimGreenScreen;

View file

@ -0,0 +1,13 @@
import GameOfSim from '@/components/GameOfSim';
const GameOfSimPage = () => {
return (
<div className="min-h-screen bg-background">
<div className="container mx-auto px-4 py-8">
<GameOfSim showSocialShare={true} />
</div>
</div>
);
};
export default GameOfSimPage;

View file

@ -2,13 +2,7 @@ import Layout from "@/components/Layout";
import GamesGallery from "@/components/GamesGallery";
const Games = () => {
return (
<Layout>
<div className="container mx-auto px-4 py-8">
<GamesGallery />
</div>
</Layout>
);
return <GamesGallery />;
};
export default Games;