Merge pull request 'landing navbar footer javítás' (#78) from ujbarni into main
Reviewed-on: #78
This commit was merged in pull request #78.
This commit is contained in:
@@ -70,12 +70,6 @@ const Footer = () => {
|
||||
>
|
||||
Rólunk
|
||||
</button>
|
||||
<button
|
||||
onClick={goContacts}
|
||||
className="text-left hover:underline hover:text-green-500 transition-colors"
|
||||
>
|
||||
Kapcsolat
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Közösség */}
|
||||
|
||||
@@ -7,10 +7,12 @@ import { FaUsers, FaPaintBrush, FaHeadset } from "react-icons/fa"
|
||||
import { motion } from "framer-motion"
|
||||
import { isAuthenticated } from "../../hooks/useRequireAuth" // <-- added import
|
||||
import { useNavigate } from "react-router-dom" // <-- NEW
|
||||
import HandleNavigate from "../../utils/HandleNavigate/HandleNavigate" // <-- NEW
|
||||
|
||||
const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame, onNavigateToContacts }) => {
|
||||
const auth = isAuthenticated() // <-- check without redirect
|
||||
const navigate = useNavigate() // <-- NEW
|
||||
// 🔧 HIBA JAVÍTVA: függvénydefiníció hozzáadva
|
||||
const LandingPage = () => {
|
||||
const { goLanding, goAbout, goHome, goLogin, goAuth } = HandleNavigate()
|
||||
const auth = isAuthenticated() // a hitelesítési állapot meghatározásához
|
||||
|
||||
return (
|
||||
<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 –
|
||||
mindezt szórakozva!
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
className="text-xl md:text-2xl font-bold text-emerald-400 mb-10"
|
||||
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 */}
|
||||
{!auth ? (
|
||||
<>
|
||||
<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="Bejelentkezés" onClick={goLogin} width="w-60" />
|
||||
<ButtonGreen text="Regisztráció" onClick={goAuth} 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>
|
||||
</div>
|
||||
@@ -178,7 +181,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame, onN
|
||||
|
||||
<ButtonGreen
|
||||
text="Kapcsolatfelvétel"
|
||||
onClick={onNavigateToContacts}
|
||||
onClick={goAbout}
|
||||
className="px-12 py-4 text-xl font-bold"
|
||||
/>
|
||||
</motion.div>
|
||||
|
||||
@@ -35,12 +35,12 @@ const Navbar = () => {
|
||||
<div className="flex justify-between h-16 items-center">
|
||||
{/* Logo + Brand */}
|
||||
<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} />
|
||||
</button>
|
||||
<button
|
||||
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
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user