Navbar,landing, meg a többi frontend javítás

This commit is contained in:
2025-10-22 15:15:20 +02:00
parent ad5f13a8e1
commit d16d481d86
3 changed files with 58 additions and 66 deletions
@@ -8,7 +8,7 @@ import { motion } from "framer-motion"
import { isAuthenticated } from "../../hooks/useRequireAuth" // <-- added import
import { useNavigate } from "react-router-dom" // <-- NEW
const LandingPage = ({ onNavigateToPlay, onNavigateToAuth }) => {
const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame }) => {
const auth = isAuthenticated() // <-- check without redirect
const navigate = useNavigate() // <-- NEW
@@ -65,6 +65,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth }) => {
<>
<ButtonGreen text="Bejelntekezés" onClick={onNavigateToPlay} width="w-60" />
<ButtonGreen text="Regisztráció" onClick={onNavigateToAuth} width="w-60" />
<ButtonGreen text="Játék" onClick={onNavigateToGame} width="w-60" />
</>
) : (
<ButtonGreen text="Játék" onClick={() => navigate("/home")} width="w-60" />