Add Stacking Blocks interactive
Add "Stacking Blocks" interactive to the Puzzles page. This new interactive is based on the description provided in the attached screenshots.
This commit is contained in:
parent
1adc590312
commit
d352192c9e
5 changed files with 322 additions and 0 deletions
29
src/pages/StackingBlocksPage.tsx
Normal file
29
src/pages/StackingBlocksPage.tsx
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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 (
|
||||
<div className="min-h-screen bg-background">
|
||||
<div className="container mx-auto px-4 py-8 space-y-6">
|
||||
<div className="flex items-center gap-4">
|
||||
<button
|
||||
onClick={() => window.location.href = '/themes/puzzles'}
|
||||
className="text-primary hover:text-primary/80 font-medium"
|
||||
>
|
||||
← Back to Puzzles
|
||||
</button>
|
||||
</div>
|
||||
<StackingBlocks showSocialShare={true} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return <StackingBlocks showSocialShare={true} />;
|
||||
};
|
||||
|
||||
export default StackingBlocksPage;
|
||||
|
|
@ -75,6 +75,16 @@ const Puzzles = () => {
|
|||
difficulty: "Intermediate" as const,
|
||||
duration: "5-15 min",
|
||||
participants: "1 player"
|
||||
},
|
||||
{
|
||||
id: "stacking-blocks",
|
||||
title: "Stacking Blocks Optimization",
|
||||
description: "Split stacks of blocks to maximize your score! Each split earns points equal to the product of the new stack sizes.",
|
||||
path: "/puzzles/stacking-blocks",
|
||||
tags: ["Optimization", "Strategy", "Mathematical", "Algorithm"],
|
||||
difficulty: "Intermediate" as const,
|
||||
duration: "10-20 min",
|
||||
participants: "1 player"
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue