Merge branch 'main' into zsolahibatxt
This commit is contained in:
@@ -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="Bejelentkezé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" />
|
||||
|
||||
Reference in New Issue
Block a user