userflow_fix

This commit is contained in:
2025-10-15 15:13:53 +02:00
parent 1db1776217
commit a5dd9003c1
5 changed files with 28 additions and 10 deletions
+7
View File
@@ -32,3 +32,10 @@ MINIO_USE_SSL=false
MAX_SPECIAL_FIELDS_PERCENTAGE=67
MAX_GENERATION_TIME_SECONDS=20
GENERATION_ERROR_TOLERANCE=15
# EMAIL SERVICE CONFIGURATION
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your_email@domain.com
EMAIL_PASS=your_email_password
EMAIL_FROM=noreply@serpentrace.com
+10
View File
@@ -73,3 +73,13 @@ export const verifyEmail = async (token) => {
throw error
}
}
// Get current user's game statistics
export const getUserStats = async () => {
try {
const response = await apiClient.get("/users/me/stats")
return response.data
} catch (error) {
throw error
}
}
@@ -55,7 +55,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth }) => {
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.7, delay: 1 }}
>
<ButtonGreen text="Játék" onClick={onNavigateToPlay} width="w-60" />
<ButtonGreen text="Bejelntekezés" onClick={onNavigateToPlay} width="w-60" />
<ButtonGreen text="Regisztráció" onClick={onNavigateToAuth} width="w-60" />
</motion.div>
</div>
@@ -1,23 +1,23 @@
// src/pages/Landing/Landingpage.jsx
// Főoldal - Landing Page
import { useState } from "react"
import { useNavigate } from "react-router-dom"
import Navbar from "../../components/Navbar/Navbar"
import Footer from "../../components/Footer/Footer.jsx"
import Background from "../../assets/backgrounds/Background.jsx"
import LandingPage from "../../components/Landingpage/LandingPage.jsx"
export default function LandingPageMain() {
// Navigációs callbackok
const navigate = useNavigate();
const handleNavigateToPlay = () => {
// Itt lehet navigálni a játék oldalra
alert("Navigáció a játék oldalra")
}
navigate("/login");
};
const handleNavigateToAuth = () => {
// Itt lehet navigálni a bejelentkezés oldalra
alert("Navigáció a bejelentkezés oldalra")
}
navigate("/register");
};
return (
<div className="w-full min-h-screen flex flex-col relative overflow-x-hidden">
@@ -32,5 +32,5 @@ export default function LandingPageMain() {
</main>
<Footer />
</div>
)
);
}
@@ -3,6 +3,7 @@ import { useState } from "react"
import Navbar from "../../components/Navbar/Navbar.jsx"
import Footer from "../../components/Footer/Footer.jsx"
import Background from "../../assets/backgrounds/Background.jsx"
import { getUserStats } from "../../api/userApi.js"
export default function Reports() {
return (