landing navbar footer javítás #78
@@ -70,12 +70,6 @@ const Footer = () => {
|
|||||||
>
|
>
|
||||||
Rólunk
|
Rólunk
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
onClick={goContacts}
|
|
||||||
className="text-left hover:underline hover:text-green-500 transition-colors"
|
|
||||||
>
|
|
||||||
Kapcsolat
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Közösség */}
|
{/* Közösség */}
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ import { FaUsers, FaPaintBrush, FaHeadset } from "react-icons/fa"
|
|||||||
import { motion } from "framer-motion"
|
import { motion } from "framer-motion"
|
||||||
import { isAuthenticated } from "../../hooks/useRequireAuth" // <-- added import
|
import { isAuthenticated } from "../../hooks/useRequireAuth" // <-- added import
|
||||||
import { useNavigate } from "react-router-dom" // <-- NEW
|
import { useNavigate } from "react-router-dom" // <-- NEW
|
||||||
|
import HandleNavigate from "../../utils/HandleNavigate/HandleNavigate" // <-- NEW
|
||||||
|
|
||||||
const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame, onNavigateToContacts }) => {
|
// 🔧 HIBA JAVÍTVA: függvénydefiníció hozzáadva
|
||||||
const auth = isAuthenticated() // <-- check without redirect
|
const LandingPage = () => {
|
||||||
const navigate = useNavigate() // <-- NEW
|
const { goLanding, goAbout, goHome, goLogin, goAuth } = HandleNavigate()
|
||||||
|
const auth = isAuthenticated() // a hitelesítési állapot meghatározásához
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
@@ -45,6 +47,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame, onN
|
|||||||
A SerpentRace egy társasjáték, ahol új barátokra lelhetsz, közösséget építhetsz és tanulhatsz –
|
A SerpentRace egy társasjáték, ahol új barátokra lelhetsz, közösséget építhetsz és tanulhatsz –
|
||||||
mindezt szórakozva!
|
mindezt szórakozva!
|
||||||
</motion.p>
|
</motion.p>
|
||||||
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="text-xl md:text-2xl font-bold text-emerald-400 mb-10"
|
className="text-xl md:text-2xl font-bold text-emerald-400 mb-10"
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
@@ -63,12 +66,12 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame, onN
|
|||||||
{/* If not authenticated show Login/Register; if authenticated show Home button */}
|
{/* If not authenticated show Login/Register; if authenticated show Home button */}
|
||||||
{!auth ? (
|
{!auth ? (
|
||||||
<>
|
<>
|
||||||
<ButtonGreen text="Bejelentkezés" onClick={onNavigateToPlay} width="w-60" />
|
<ButtonGreen text="Bejelentkezés" onClick={goLogin} width="w-60" />
|
||||||
<ButtonGreen text="Regisztráció" onClick={onNavigateToAuth} width="w-60" />
|
<ButtonGreen text="Regisztráció" onClick={goAuth} width="w-60" />
|
||||||
<ButtonGreen text="Játék" onClick={onNavigateToGame} width="w-60" />
|
<ButtonGreen text="Játék" onClick={goHome} width="w-60" />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<ButtonGreen text="Játék" onClick={onNavigateToGame} width="w-60" />
|
<ButtonGreen text="Játék" onClick={goHome} width="w-60" />
|
||||||
)}
|
)}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
@@ -178,7 +181,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame, onN
|
|||||||
|
|
||||||
<ButtonGreen
|
<ButtonGreen
|
||||||
text="Kapcsolatfelvétel"
|
text="Kapcsolatfelvétel"
|
||||||
onClick={onNavigateToContacts}
|
onClick={goAbout}
|
||||||
className="px-12 py-4 text-xl font-bold"
|
className="px-12 py-4 text-xl font-bold"
|
||||||
/>
|
/>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ const Navbar = () => {
|
|||||||
<div className="flex justify-between h-16 items-center">
|
<div className="flex justify-between h-16 items-center">
|
||||||
{/* Logo + Brand */}
|
{/* Logo + Brand */}
|
||||||
<div className="flex-shrink-0 flex items-center gap-2">
|
<div className="flex-shrink-0 flex items-center gap-2">
|
||||||
<button onClick={goLanding} className="flex items-center mt-1 h-9">
|
<button onClick={goLanding} className=" cursor-pointer flex items-center mt-1 h-9">
|
||||||
<Logo size={36} />
|
<Logo size={36} />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={goLanding}
|
onClick={goLanding}
|
||||||
className="flex items-center h-9 text-white font-bold text-2xl tracking-tight"
|
className="cursor-pointer flex items-center h-9 text-white font-bold text-2xl tracking-tight"
|
||||||
>
|
>
|
||||||
SerpentRace
|
SerpentRace
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user