Fix "Back to Puzzles" link
Ensure "Back to Puzzles" link is displayed correctly on the pebble placement interactive page when accessed via the puzzles section.
This commit is contained in:
parent
2fb52c752a
commit
dcdfa9e5f5
1 changed files with 22 additions and 0 deletions
|
|
@ -1,6 +1,28 @@
|
||||||
import PebblePlacementGame from "@/components/PebblePlacementGame";
|
import PebblePlacementGame from "@/components/PebblePlacementGame";
|
||||||
|
import { useSearchParams } from "react-router-dom";
|
||||||
|
|
||||||
const PebblePlacementGamePage = () => {
|
const PebblePlacementGamePage = () => {
|
||||||
|
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>
|
||||||
|
<PebblePlacementGame showSocialShare={true} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return <PebblePlacementGame showSocialShare={true} />;
|
return <PebblePlacementGame showSocialShare={true} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue