diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx
index eabe147..f23cc80 100644
--- a/src/components/Layout.tsx
+++ b/src/components/Layout.tsx
@@ -1,15 +1,32 @@
import Navigation from '@/components/Navigation';
import { ReactNode } from 'react';
+import { Link } from 'react-router-dom';
+import { Button } from '@/components/ui/button';
+import { ArrowLeft } from 'lucide-react';
interface LayoutProps {
children: ReactNode;
+ showBackToGames?: boolean;
}
-const Layout = ({ children }: LayoutProps) => {
+const Layout = ({ children, showBackToGames = false }: LayoutProps) => {
return (
+ {showBackToGames && (
+
+
+
+
+
+ )}
+
{children}
diff --git a/src/pages/CrapsGamePage.tsx b/src/pages/CrapsGamePage.tsx
index 157f624..691ddb4 100644
--- a/src/pages/CrapsGamePage.tsx
+++ b/src/pages/CrapsGamePage.tsx
@@ -1,9 +1,20 @@
+import { useEffect, useState } from "react";
import Layout from "@/components/Layout";
import CrapsGame from "@/components/CrapsGame";
const CrapsGamePage = () => {
+ const [showBackLink, setShowBackLink] = useState(false);
+
+ useEffect(() => {
+ // Check if user came from games page
+ const referrer = document.referrer;
+ if (referrer.includes('/themes/games') && !referrer.includes('/themes/games/craps-game')) {
+ setShowBackLink(true);
+ }
+ }, []);
+
return (
-
+
);