From 8f2a086df69409ef8fde158399d69884b89a0cef Mon Sep 17 00:00:00 2001
From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Date: Wed, 18 Feb 2026 20:07:30 +0000
Subject: [PATCH] Standardize page wrappers, add showSocialShare prop, and add
Cmd+K search
- Standardize all page wrappers to use consistent min-h-screen bg-background pattern
- Remove Layout wrapper usage from pages that had it
- Remove page-level SocialShare and headers, move into components
- Add showSocialShare prop to all interactive components for consistent control
- Add Cmd+K / Ctrl+K command palette search across all interactives
- Export allInteractives from InteractiveIndex for reuse
Co-Authored-By: Neeldhara Misra
---
src/App.tsx | 2 +
src/components/AssistedNimGame.tsx | 20 +++--
src/components/CommandSearch.tsx | 65 +++++++++++++++
src/components/EternalDominationGame.tsx | 14 +++-
src/components/FerrersRogersRamanujan.tsx | 14 +++-
src/components/GoldCoinGame.tsx | 19 +++--
src/components/InteractiveIndex.tsx | 4 +-
src/components/NimGame.tsx | 14 ++--
src/components/RentDivisionPuzzle.tsx | 10 ++-
src/components/RulesOfInferencePlayground.tsx | 12 ++-
src/pages/AscDescGridPuzzlePage.tsx | 9 +-
src/pages/AssistedNimGamePage.tsx | 9 +-
src/pages/BagchalGamePage.tsx | 5 +-
src/pages/BalancedTernaryGamePage.tsx | 8 +-
src/pages/BinaryNumberGamePage.tsx | 8 +-
src/pages/BulgarianSolitairePage.tsx | 30 ++-----
src/pages/BurnsidesLemmaPage.tsx | 5 +-
src/pages/CubeColoringPage.tsx | 10 +--
src/pages/DominoRetilingPuzzlePage.tsx | 27 ++----
src/pages/ErdosDiscrepancyPuzzlePage.tsx | 11 +--
src/pages/EternalDominationGamePage.tsx | 83 +------------------
src/pages/FerrersRogersRamanujanPage.tsx | 23 +----
src/pages/GoldCoinGamePage.tsx | 9 +-
src/pages/LadybugClockPuzzlePage.tsx | 25 +-----
src/pages/NimGamePage.tsx | 9 +-
src/pages/ParityBitsGamePage.tsx | 11 +--
src/pages/PebblePlacementGamePage.tsx | 30 ++-----
src/pages/PresentsPuzzlePage.tsx | 7 +-
src/pages/RentDivisionPuzzlePage.tsx | 30 +------
src/pages/RulesOfInferencePlaygroundPage.tsx | 29 +------
src/pages/StackingBlocksPage.tsx | 30 ++-----
src/pages/SubtractionGamePage.tsx | 10 ++-
src/pages/TernaryNumberGamePage.tsx | 8 +-
src/pages/ZeckendorfGamePage.tsx | 8 +-
src/pages/ZeckendorfSearchTrickPage.tsx | 8 +-
35 files changed, 259 insertions(+), 357 deletions(-)
create mode 100644 src/components/CommandSearch.tsx
diff --git a/src/App.tsx b/src/App.tsx
index 9c68f71..f94e757 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -3,6 +3,7 @@ import { Toaster as Sonner } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import ErrorBoundary from "@/components/ErrorBoundary";
+import CommandSearch from "@/components/CommandSearch";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Index from "./pages/Index";
import InteractiveIndex from "./components/InteractiveIndex";
@@ -78,6 +79,7 @@ const App = () => (
+
} />
} />
diff --git a/src/components/AssistedNimGame.tsx b/src/components/AssistedNimGame.tsx
index ee3fa28..d04028c 100644
--- a/src/components/AssistedNimGame.tsx
+++ b/src/components/AssistedNimGame.tsx
@@ -66,7 +66,11 @@ const getOddPowers = (heaps: number[]): Set => {
return oddPowers;
};
-const AssistedNimGame: React.FC = () => {
+interface AssistedNimGameProps {
+ showSocialShare?: boolean;
+}
+
+const AssistedNimGame: React.FC = ({ showSocialShare = true }) => {
const [mode, setMode] = useState(null);
const [showSetup, setShowSetup] = useState(false);
const [userHeapCount, setUserHeapCount] = useState(3);
@@ -384,14 +388,14 @@ const AssistedNimGame: React.FC = () => {
- {/* Social Share */}
-
+ {showSocialShare && (
+
+ )}
);
};
-export default AssistedNimGame;
\ No newline at end of file
+export default AssistedNimGame;
\ No newline at end of file
diff --git a/src/components/CommandSearch.tsx b/src/components/CommandSearch.tsx
new file mode 100644
index 0000000..1b5a6fb
--- /dev/null
+++ b/src/components/CommandSearch.tsx
@@ -0,0 +1,65 @@
+import { useEffect, useState } from "react";
+import { useNavigate } from "react-router-dom";
+import { allInteractives } from "@/components/InteractiveIndex";
+import {
+ CommandDialog,
+ CommandEmpty,
+ CommandGroup,
+ CommandInput,
+ CommandItem,
+ CommandList,
+} from "@/components/ui/command";
+import { Badge } from "@/components/ui/badge";
+
+const CommandSearch = () => {
+ const [open, setOpen] = useState(false);
+ const navigate = useNavigate();
+
+ useEffect(() => {
+ const down = (e: KeyboardEvent) => {
+ if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ setOpen((prev) => !prev);
+ }
+ };
+ document.addEventListener("keydown", down);
+ return () => document.removeEventListener("keydown", down);
+ }, []);
+
+ const handleSelect = (path: string) => {
+ setOpen(false);
+ navigate(path);
+ };
+
+ return (
+
+
+
+ No interactives found.
+
+ {allInteractives.map((interactive) => (
+ handleSelect(interactive.path)}
+ >
+
+
+ {interactive.title}
+
+ {interactive.theme}
+
+
+
+ {interactive.description}
+
+
+
+ ))}
+
+
+
+ );
+};
+
+export default CommandSearch;
diff --git a/src/components/EternalDominationGame.tsx b/src/components/EternalDominationGame.tsx
index 4720bf1..fd2e461 100644
--- a/src/components/EternalDominationGame.tsx
+++ b/src/components/EternalDominationGame.tsx
@@ -3,6 +3,7 @@ import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
import { Shield, Target, RotateCcw, Info } from "lucide-react";
+import SocialShare from '@/components/SocialShare';
// Extended good rectangle: 10 columns × 12 rows (following Fig. 10)
// Border: columns 0 and 9, rows 0/1 (top) and 10/11 (bottom)
@@ -349,7 +350,11 @@ const defendAttack = (
};
-const EternalDominationGame: React.FC = () => {
+interface EternalDominationGameProps {
+ showSocialShare?: boolean;
+}
+
+const EternalDominationGame: React.FC = ({ showSocialShare = true }) => {
const [guards, setGuards] = useState>(generateInitialGuards);
const [attackHistory, setAttackHistory] = useState([]);
const [message, setMessage] = useState("Click any unguarded cell to attack.");
@@ -679,6 +684,13 @@ const EternalDominationGame: React.FC = () => {
)}
+
+ {showSocialShare && (
+
+ )}
);
};
diff --git a/src/components/FerrersRogersRamanujan.tsx b/src/components/FerrersRogersRamanujan.tsx
index 1da4500..a5c95ac 100644
--- a/src/components/FerrersRogersRamanujan.tsx
+++ b/src/components/FerrersRogersRamanujan.tsx
@@ -4,8 +4,13 @@ import { Button } from "@/components/ui/button";
import { Slider } from "@/components/ui/slider";
import { Input } from "@/components/ui/input";
import { toast } from "sonner";
+import SocialShare from '@/components/SocialShare';
-const FerrersRogersRamanujan = () => {
+interface FerrersRogersRamanujanProps {
+ showSocialShare?: boolean;
+}
+
+const FerrersRogersRamanujan = ({ showSocialShare = true }: FerrersRogersRamanujanProps) => {
const [n, setN] = useState(14);
const [partitionSliders, setPartitionSliders] = useState([]);
const [committedPartition, setCommittedPartition] = useState([]);
@@ -330,6 +335,13 @@ const FerrersRogersRamanujan = () => {
The hook sizes form a new partition where parts differ by at least 2.
+
+ {showSocialShare && (
+
+ )}
);
diff --git a/src/components/GoldCoinGame.tsx b/src/components/GoldCoinGame.tsx
index f2dd211..456dc17 100644
--- a/src/components/GoldCoinGame.tsx
+++ b/src/components/GoldCoinGame.tsx
@@ -18,7 +18,11 @@ interface GameState {
moveHistory: string[];
}
-const GoldCoinGame: React.FC = () => {
+interface GoldCoinGameProps {
+ showSocialShare?: boolean;
+}
+
+const GoldCoinGame: React.FC = ({ showSocialShare = true }) => {
const [gameState, setGameState] = useState({
track: Array(15).fill('empty'),
currentPlayer: 0,
@@ -421,13 +425,14 @@ const GoldCoinGame: React.FC = () => {
-
+ {showSocialShare && (
+
+ )}
);
};
-export default GoldCoinGame;
\ No newline at end of file
+export default GoldCoinGame;
\ No newline at end of file
diff --git a/src/components/InteractiveIndex.tsx b/src/components/InteractiveIndex.tsx
index d2dbe67..3017d22 100644
--- a/src/components/InteractiveIndex.tsx
+++ b/src/components/InteractiveIndex.tsx
@@ -18,7 +18,7 @@ interface Interactive {
}
// This would ideally be generated from the actual components, but for now we'll hardcode
-const allInteractives: Interactive[] = [
+export const allInteractives: Interactive[] = [
{
id: 'binary-number-game',
title: 'Binary Number Representation',
@@ -549,4 +549,4 @@ const InteractiveIndex = () => {
);
};
-export default InteractiveIndex;
\ No newline at end of file
+export default InteractiveIndex;
\ No newline at end of file
diff --git a/src/components/NimGame.tsx b/src/components/NimGame.tsx
index 924a523..5fe070c 100644
--- a/src/components/NimGame.tsx
+++ b/src/components/NimGame.tsx
@@ -27,7 +27,11 @@ const heapColors = [
'#f87171', '#a78bfa', '#fbbf24', '#60a5fa', '#34d399', '#f472b6', '#f87171', '#a78bfa', '#facc15', '#38bdf8',
];
-const NimGame: React.FC = () => {
+interface NimGameProps {
+ showSocialShare?: boolean;
+}
+
+const NimGame: React.FC = ({ showSocialShare = true }) => {
const [mode, setMode] = useState(null);
const [showSetup, setShowSetup] = useState(false);
const [userHeapCount, setUserHeapCount] = useState(3);
@@ -275,16 +279,14 @@ const NimGame: React.FC = () => {
- {/* Social Share */}
-
+ {showSocialShare && (
-
+ )}
);
};
-export default NimGame;
\ No newline at end of file
+export default NimGame;
\ No newline at end of file
diff --git a/src/components/RentDivisionPuzzle.tsx b/src/components/RentDivisionPuzzle.tsx
index b06a5b1..51f9951 100644
--- a/src/components/RentDivisionPuzzle.tsx
+++ b/src/components/RentDivisionPuzzle.tsx
@@ -11,6 +11,7 @@ import {
SelectValue,
} from "@/components/ui/select";
import { RefreshCw, User, UserRound, Users, UserCheck } from "lucide-react";
+import SocialShare from '@/components/SocialShare';
const AGENTS = ["Alice", "Bob", "Charlie", "Dana"];
const AGENT_ICONS = [User, UserRound, Users, UserCheck];
@@ -23,9 +24,10 @@ const ROOM_COLORS = [
interface RentDivisionPuzzleProps {
onComplete?: (completed: boolean) => void;
+ showSocialShare?: boolean;
}
-const RentDivisionPuzzle = ({ onComplete }: RentDivisionPuzzleProps) => {
+const RentDivisionPuzzle = ({ onComplete, showSocialShare = true }: RentDivisionPuzzleProps) => {
// V-matrix: valuations[agent][room]
const [valuations, setValuations] = useState(() =>
Array.from({ length: 4 }, () =>
@@ -469,6 +471,12 @@ const RentDivisionPuzzle = ({ onComplete }: RentDivisionPuzzleProps) => {
+ {showSocialShare && (
+
+ )}
);
};
diff --git a/src/components/RulesOfInferencePlayground.tsx b/src/components/RulesOfInferencePlayground.tsx
index 1f226f8..54d85b9 100644
--- a/src/components/RulesOfInferencePlayground.tsx
+++ b/src/components/RulesOfInferencePlayground.tsx
@@ -3,6 +3,7 @@ import { Button } from "@/components/ui/button";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { useToast } from "@/hooks/use-toast";
import { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog";
+import SocialShare from '@/components/SocialShare';
// Rules of Inference Playground (Example 1: Resolution)
// Layout: 3 columns (Premises | Notepad lines with rule margin | Rules)
@@ -196,7 +197,7 @@ function DropZone({ children, onDrop, className }: { children?: React.ReactNode;
);
}
-export default function RulesOfInferencePlayground({ onComplete }: { onComplete?: (completed: boolean) => void }) {
+export default function RulesOfInferencePlayground({ onComplete, showSocialShare = true }: { onComplete?: (completed: boolean) => void; showSocialShare?: boolean }) {
const { toast } = useToast();
const [exampleId, setExampleId] = useState(EXAMPLES[0].id);
const example = useMemo(() => EXAMPLES.find((e) => e.id === exampleId)!, [exampleId]);
@@ -579,6 +580,13 @@ export default function RulesOfInferencePlayground({ onComplete }: { onComplete?
+
+ {showSocialShare && (
+
+ )}
);
-}
\ No newline at end of file
+}
diff --git a/src/pages/AscDescGridPuzzlePage.tsx b/src/pages/AscDescGridPuzzlePage.tsx
index 7963768..da7dde4 100644
--- a/src/pages/AscDescGridPuzzlePage.tsx
+++ b/src/pages/AscDescGridPuzzlePage.tsx
@@ -1,13 +1,12 @@
-import Layout from "@/components/Layout";
import AscDescGridPuzzle from "@/components/AscDescGridPuzzle";
const AscDescGridPuzzlePage = () => {
return (
-
-
-
+
);
};
diff --git a/src/pages/AssistedNimGamePage.tsx b/src/pages/AssistedNimGamePage.tsx
index 233302a..61b9527 100644
--- a/src/pages/AssistedNimGamePage.tsx
+++ b/src/pages/AssistedNimGamePage.tsx
@@ -1,12 +1,13 @@
-import React from 'react';
import AssistedNimGame from '@/components/AssistedNimGame';
const AssistedNimGamePage = () => {
return (
-
-
+
);
};
-export default AssistedNimGamePage;
\ No newline at end of file
+export default AssistedNimGamePage;
\ No newline at end of file
diff --git a/src/pages/BagchalGamePage.tsx b/src/pages/BagchalGamePage.tsx
index 2e1ff48..3d65664 100644
--- a/src/pages/BagchalGamePage.tsx
+++ b/src/pages/BagchalGamePage.tsx
@@ -1,13 +1,12 @@
-import Layout from "@/components/Layout";
import BagchalGame from "@/components/BagchalGame";
const BagchalGamePage = () => {
return (
-
+
);
};
diff --git a/src/pages/BalancedTernaryGamePage.tsx b/src/pages/BalancedTernaryGamePage.tsx
index 61f4057..bd70437 100644
--- a/src/pages/BalancedTernaryGamePage.tsx
+++ b/src/pages/BalancedTernaryGamePage.tsx
@@ -2,12 +2,12 @@ import BalancedTernaryGame from '@/components/BalancedTernaryGame';
const BalancedTernaryGamePage = () => {
return (
-
-
-
+
);
};
-export default BalancedTernaryGamePage;
\ No newline at end of file
+export default BalancedTernaryGamePage;
diff --git a/src/pages/BinaryNumberGamePage.tsx b/src/pages/BinaryNumberGamePage.tsx
index d12b6c1..15b8a5c 100644
--- a/src/pages/BinaryNumberGamePage.tsx
+++ b/src/pages/BinaryNumberGamePage.tsx
@@ -2,12 +2,12 @@ import BinaryNumberGame from '@/components/BinaryNumberGame';
const BinaryNumberGamePage = () => {
return (
-
-
-
+
);
};
-export default BinaryNumberGamePage;
\ No newline at end of file
+export default BinaryNumberGamePage;
diff --git a/src/pages/BulgarianSolitairePage.tsx b/src/pages/BulgarianSolitairePage.tsx
index 2a9dfc6..0f6651d 100644
--- a/src/pages/BulgarianSolitairePage.tsx
+++ b/src/pages/BulgarianSolitairePage.tsx
@@ -1,29 +1,13 @@
import BulgarianSolitaire from "@/components/BulgarianSolitaire";
-import { useSearchParams } from "react-router-dom";
const BulgarianSolitairePage = () => {
- const [searchParams] = useSearchParams();
- const from = searchParams.get('from');
-
- if (from === 'puzzles') {
- return (
-
-
-
- window.location.href = '/themes/puzzles'}
- className="text-primary hover:text-primary/80 font-medium"
- >
- ← Back to Puzzles
-
-
-
-
+ return (
+
+
+
- );
- }
-
- return
;
+
+ );
};
-export default BulgarianSolitairePage;
\ No newline at end of file
+export default BulgarianSolitairePage;
diff --git a/src/pages/BurnsidesLemmaPage.tsx b/src/pages/BurnsidesLemmaPage.tsx
index c3b7303..713c547 100644
--- a/src/pages/BurnsidesLemmaPage.tsx
+++ b/src/pages/BurnsidesLemmaPage.tsx
@@ -1,13 +1,12 @@
-import Layout from '@/components/Layout';
import BurnsidesLemma from '@/components/BurnsidesLemma';
const BurnsidesLemmaPage = () => {
return (
-
+
);
};
diff --git a/src/pages/CubeColoringPage.tsx b/src/pages/CubeColoringPage.tsx
index 30ddb00..1d8d941 100644
--- a/src/pages/CubeColoringPage.tsx
+++ b/src/pages/CubeColoringPage.tsx
@@ -1,16 +1,12 @@
-import Layout from '@/components/Layout';
import CubeColoring from '@/components/CubeColoring';
const CubeColoringPage = () => {
return (
-
+
);
};
diff --git a/src/pages/DominoRetilingPuzzlePage.tsx b/src/pages/DominoRetilingPuzzlePage.tsx
index e3f7af7..8170ba1 100644
--- a/src/pages/DominoRetilingPuzzlePage.tsx
+++ b/src/pages/DominoRetilingPuzzlePage.tsx
@@ -1,28 +1,13 @@
-import Layout from '@/components/Layout';
import DominoRetilingPuzzle from '@/components/DominoRetilingPuzzle';
-import { useLocation, Link } from 'react-router-dom';
-import { ArrowLeft } from 'lucide-react';
const DominoRetilingPuzzlePage = () => {
- const location = useLocation();
- const fromPuzzles = location.search.includes('from=puzzles');
-
return (
-
- {fromPuzzles && (
-
-
-
- Back to Puzzles
-
-
- )}
-
-
+
);
};
-export default DominoRetilingPuzzlePage;
\ No newline at end of file
+export default DominoRetilingPuzzlePage;
diff --git a/src/pages/ErdosDiscrepancyPuzzlePage.tsx b/src/pages/ErdosDiscrepancyPuzzlePage.tsx
index cb323f8..2578ef0 100644
--- a/src/pages/ErdosDiscrepancyPuzzlePage.tsx
+++ b/src/pages/ErdosDiscrepancyPuzzlePage.tsx
@@ -1,15 +1,12 @@
-import Layout from "@/components/Layout";
import ErdosDiscrepancyPuzzle from "@/components/ErdosDiscrepancyPuzzle";
const ErdosDiscrepancyPuzzlePage = () => {
return (
-
-
-
-
-
+
);
};
diff --git a/src/pages/EternalDominationGamePage.tsx b/src/pages/EternalDominationGamePage.tsx
index bd81bb9..54506fe 100644
--- a/src/pages/EternalDominationGamePage.tsx
+++ b/src/pages/EternalDominationGamePage.tsx
@@ -1,87 +1,12 @@
-import Layout from "@/components/Layout";
import EternalDominationGame from "@/components/EternalDominationGame";
-import SocialShare from "@/components/SocialShare";
-import { Badge } from "@/components/ui/badge";
-import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";
const EternalDominationGamePage = () => {
return (
-
-
-
-
-
Miscellany
-
Eternal Domination on a Grid
-
- Explore the m-eternal domination problem on a 12×10 grid. Guards must maintain
- a dominating set while defending against arbitrary attack sequences.
-
-
-
-
-
-
-
- Mathematical Background
-
-
- Dominating Set: A subset S of vertices in a graph G such that
- every vertex not in S has a neighbor in S. Think of guards placed at certain
- vertices that can "watch" their neighbors.
-
-
- m-Eternal Domination: A two-player game where the defender
- places guards on vertices, and the attacker repeatedly attacks unguarded vertices.
- The defender responds by moving guards (all can move simultaneously, but only to
- adjacent vertices) such that one guard ends on the attacked vertex and the guards
- still form a dominating set.
-
-
- The Challenge: The defender wins if they can maintain a dominating
- set forever against any attack sequence. The m-eternal domination number γ∞(G) is
- the minimum number of guards needed to win.
-
-
-
-
-
- Defense Strategy
-
-
- This implementation uses the strategy from research on finite grids:
-
-
- Border guards: All vertices on the border (rows 0, 1, 8, 9 and
- columns 0, 11) are always guarded, forming a protective cycle C.
- Interior guards: Placed in a pattern that ensures every interior
- vertex is dominated by exactly one guard.
- Defense mechanism: When attacked, interior guards shift toward
- the attack, potentially pushing a guard to the border. Border guards shift along
- "complementary paths" to fill the resulting gaps.
-
-
-
-
-
- Reference
-
-
- Based on: "m-Eternal Domination and Variants on Some Classes of Finite and
- Infinite Graphs" by Calamoneri et al. (CIAC 2025), which establishes bounds
- and strategies for eternal domination on various grid types including square,
- hexagonal, and triangular grids.
-
-
-
-
-
-
-
+
);
};
diff --git a/src/pages/FerrersRogersRamanujanPage.tsx b/src/pages/FerrersRogersRamanujanPage.tsx
index c343f8e..35253d1 100644
--- a/src/pages/FerrersRogersRamanujanPage.tsx
+++ b/src/pages/FerrersRogersRamanujanPage.tsx
@@ -1,27 +1,12 @@
-import Layout from "@/components/Layout";
import FerrersRogersRamanujan from "@/components/FerrersRogersRamanujan";
-import SocialShare from "@/components/SocialShare";
const FerrersRogersRamanujanPage = () => {
return (
-
-
-
-
Ferrers Diagram & Rogers-Ramanujan Partition
-
- Explore integer partitions through visual Ferrers diagrams and discover the elegant Rogers-Ramanujan transformation.
-
-
-
-
-
-
+
);
};
diff --git a/src/pages/GoldCoinGamePage.tsx b/src/pages/GoldCoinGamePage.tsx
index d838ae9..0ef4b78 100644
--- a/src/pages/GoldCoinGamePage.tsx
+++ b/src/pages/GoldCoinGamePage.tsx
@@ -1,12 +1,13 @@
-import React from 'react';
import GoldCoinGame from '@/components/GoldCoinGame';
const GoldCoinGamePage = () => {
return (
-
-
+
);
};
-export default GoldCoinGamePage;
\ No newline at end of file
+export default GoldCoinGamePage;
\ No newline at end of file
diff --git a/src/pages/LadybugClockPuzzlePage.tsx b/src/pages/LadybugClockPuzzlePage.tsx
index df6554a..71bdf85 100644
--- a/src/pages/LadybugClockPuzzlePage.tsx
+++ b/src/pages/LadybugClockPuzzlePage.tsx
@@ -1,29 +1,12 @@
-import Layout from '@/components/Layout';
import LadybugClockPuzzle from '@/components/LadybugClockPuzzle';
-import { useLocation, Link } from 'react-router-dom';
-import { ArrowLeft } from 'lucide-react';
const LadybugClockPuzzlePage = () => {
- const location = useLocation();
- const fromPuzzles = location.search.includes('from=puzzles');
-
return (
-
- {fromPuzzles && (
-
-
-
- Back to Puzzles
-
-
- )}
-
-
+
);
};
diff --git a/src/pages/NimGamePage.tsx b/src/pages/NimGamePage.tsx
index aa202f6..f34463a 100644
--- a/src/pages/NimGamePage.tsx
+++ b/src/pages/NimGamePage.tsx
@@ -1,12 +1,13 @@
-import React from 'react';
import NimGame from '@/components/NimGame';
const NimGamePage = () => {
return (
-
-
+
);
};
-export default NimGamePage;
\ No newline at end of file
+export default NimGamePage;
\ No newline at end of file
diff --git a/src/pages/ParityBitsGamePage.tsx b/src/pages/ParityBitsGamePage.tsx
index 6ba5a0b..58949d2 100644
--- a/src/pages/ParityBitsGamePage.tsx
+++ b/src/pages/ParityBitsGamePage.tsx
@@ -1,12 +1,13 @@
-import Layout from "@/components/Layout";
import ParityBitsGame from "@/components/ParityBitsGame";
const ParityBitsGamePage = () => {
return (
-
-
-
+
);
};
-export default ParityBitsGamePage;
\ No newline at end of file
+export default ParityBitsGamePage;
diff --git a/src/pages/PebblePlacementGamePage.tsx b/src/pages/PebblePlacementGamePage.tsx
index e6013d1..c359304 100644
--- a/src/pages/PebblePlacementGamePage.tsx
+++ b/src/pages/PebblePlacementGamePage.tsx
@@ -1,29 +1,13 @@
import PebblePlacementGame from "@/components/PebblePlacementGame";
-import { useSearchParams } from "react-router-dom";
const PebblePlacementGamePage = () => {
- const [searchParams] = useSearchParams();
- const from = searchParams.get('from');
-
- if (from === 'puzzles') {
- return (
-
-
-
- window.location.href = '/themes/puzzles'}
- className="text-primary hover:text-primary/80 font-medium"
- >
- ← Back to Puzzles
-
-
-
-
+ return (
+
+
- );
- }
-
- return
;
+
+ );
};
-export default PebblePlacementGamePage;
\ No newline at end of file
+export default PebblePlacementGamePage;
diff --git a/src/pages/PresentsPuzzlePage.tsx b/src/pages/PresentsPuzzlePage.tsx
index cc51817..edb710a 100644
--- a/src/pages/PresentsPuzzlePage.tsx
+++ b/src/pages/PresentsPuzzlePage.tsx
@@ -1,13 +1,12 @@
-import Layout from '@/components/Layout';
import PresentsPuzzle from "@/components/PresentsPuzzle";
const PresentsPuzzlePage = () => {
return (
-
-
+
);
};
diff --git a/src/pages/RentDivisionPuzzlePage.tsx b/src/pages/RentDivisionPuzzlePage.tsx
index 63dad7f..154033f 100644
--- a/src/pages/RentDivisionPuzzlePage.tsx
+++ b/src/pages/RentDivisionPuzzlePage.tsx
@@ -1,34 +1,10 @@
-import { useState } from "react";
import RentDivisionPuzzle from "@/components/RentDivisionPuzzle";
-import SocialShare from "@/components/SocialShare";
const RentDivisionPuzzlePage = () => {
- const [isCompleted, setIsCompleted] = useState(false);
-
return (
-
-
-
-
- Envy-Free Rent Division
-
-
- Explore fair division by assigning rooms and setting rents. Can you find an
- allocation where no one envies another?
-
-
-
-
-
-
+
);
diff --git a/src/pages/RulesOfInferencePlaygroundPage.tsx b/src/pages/RulesOfInferencePlaygroundPage.tsx
index 8c9a2f8..34a2fd3 100644
--- a/src/pages/RulesOfInferencePlaygroundPage.tsx
+++ b/src/pages/RulesOfInferencePlaygroundPage.tsx
@@ -1,34 +1,13 @@
-import { useState } from "react";
import RulesOfInferencePlayground from "@/components/RulesOfInferencePlayground";
-import SocialShare from "@/components/SocialShare";
const RulesOfInferencePlaygroundPage = () => {
- const [isCompleted, setIsCompleted] = useState(false);
-
return (
-
-
-
-
Rules of Inference Playground
-
- Practice applying resolution and equivalence rules to derive conclusions step by step.
-
-
-
-
-
-
+
);
};
-export default RulesOfInferencePlaygroundPage;
\ No newline at end of file
+export default RulesOfInferencePlaygroundPage;
diff --git a/src/pages/StackingBlocksPage.tsx b/src/pages/StackingBlocksPage.tsx
index 7239dfc..ccb4f78 100644
--- a/src/pages/StackingBlocksPage.tsx
+++ b/src/pages/StackingBlocksPage.tsx
@@ -1,29 +1,13 @@
import StackingBlocks from "@/components/StackingBlocks";
-import { useSearchParams } from "react-router-dom";
const StackingBlocksPage = () => {
- const [searchParams] = useSearchParams();
- const from = searchParams.get('from');
-
- if (from === 'puzzles') {
- return (
-
-
-
- window.location.href = '/themes/puzzles'}
- className="text-primary hover:text-primary/80 font-medium"
- >
- ← Back to Puzzles
-
-
-
-
+ return (
+
+
+
- );
- }
-
- return
;
+
+ );
};
-export default StackingBlocksPage;
\ No newline at end of file
+export default StackingBlocksPage;
diff --git a/src/pages/SubtractionGamePage.tsx b/src/pages/SubtractionGamePage.tsx
index 302ca9c..75c3d78 100644
--- a/src/pages/SubtractionGamePage.tsx
+++ b/src/pages/SubtractionGamePage.tsx
@@ -1,7 +1,13 @@
import SubtractionGame from '@/components/SubtractionGame';
const SubtractionGamePage = () => {
- return
;
+ return (
+
+ );
};
-export default SubtractionGamePage;
\ No newline at end of file
+export default SubtractionGamePage;
diff --git a/src/pages/TernaryNumberGamePage.tsx b/src/pages/TernaryNumberGamePage.tsx
index 79ba882..a85620d 100644
--- a/src/pages/TernaryNumberGamePage.tsx
+++ b/src/pages/TernaryNumberGamePage.tsx
@@ -2,12 +2,12 @@ import TernaryNumberGame from '@/components/TernaryNumberGame';
const TernaryNumberGamePage = () => {
return (
-
-
-
+
);
};
-export default TernaryNumberGamePage;
\ No newline at end of file
+export default TernaryNumberGamePage;
diff --git a/src/pages/ZeckendorfGamePage.tsx b/src/pages/ZeckendorfGamePage.tsx
index 130ecfa..c585236 100644
--- a/src/pages/ZeckendorfGamePage.tsx
+++ b/src/pages/ZeckendorfGamePage.tsx
@@ -2,12 +2,12 @@ import ZeckendorfGame from '@/components/ZeckendorfGame';
const ZeckendorfGamePage = () => {
return (
-
-
-
+
);
};
-export default ZeckendorfGamePage;
\ No newline at end of file
+export default ZeckendorfGamePage;
\ No newline at end of file
diff --git a/src/pages/ZeckendorfSearchTrickPage.tsx b/src/pages/ZeckendorfSearchTrickPage.tsx
index 59e977f..f5cc437 100644
--- a/src/pages/ZeckendorfSearchTrickPage.tsx
+++ b/src/pages/ZeckendorfSearchTrickPage.tsx
@@ -2,12 +2,12 @@ import ZeckendorfSearchTrick from '@/components/ZeckendorfSearchTrick';
const ZeckendorfSearchTrickPage = () => {
return (
-
-
-
+
);
};
-export default ZeckendorfSearchTrickPage;
\ No newline at end of file
+export default ZeckendorfSearchTrickPage;
\ No newline at end of file