navbar meg fooldal navigációk illetve companies -> contacts
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, onNavigateToGame }) => {
|
||||
const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame, onNavigateToContacts }) => {
|
||||
const auth = isAuthenticated() // <-- check without redirect
|
||||
const navigate = useNavigate() // <-- NEW
|
||||
|
||||
@@ -68,7 +68,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame }) =
|
||||
<ButtonGreen text="Játék" onClick={onNavigateToGame} width="w-60" />
|
||||
</>
|
||||
) : (
|
||||
<ButtonGreen text="Játék" onClick={() => navigate("/home")} width="w-60" />
|
||||
<ButtonGreen text="Játék" onClick={onNavigateToGame} width="w-60" />
|
||||
)}
|
||||
</motion.div>
|
||||
</div>
|
||||
@@ -178,7 +178,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame }) =
|
||||
|
||||
<ButtonGreen
|
||||
text="Kapcsolatfelvétel"
|
||||
onClick={onNavigateToAuth}
|
||||
onClick={onNavigateToContacts}
|
||||
className="px-12 py-4 text-xl font-bold"
|
||||
/>
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user