diff --git a/SerpentRace_Frontend/src/pages/Auth/ForgotPassword.jsx b/SerpentRace_Frontend/src/pages/Auth/ForgotPassword.jsx new file mode 100644 index 00000000..0d70df12 --- /dev/null +++ b/SerpentRace_Frontend/src/pages/Auth/ForgotPassword.jsx @@ -0,0 +1,45 @@ +// src/pages/Auth/ForgotPassword.jsx +// Itt kéri az emailt amire a jelszó visszaállítást kérjük + +import { useState } from "react"; +import Background from "../../assets/backgrounds/Background"; +import { motion } from "framer-motion"; +import Button from "../../components/Buttons/Button"; +import InputBox from "../../components/Inputs/InputBox"; + +export default function ForgotPassword() { + const [email, setEmail] = useState(""); + + const handleSubmit = (e) => { + e.preventDefault(); + // Backend API + console.log("Elfelejtett jelszó email:", email); + }; + + return ( +
+ + +
+

+ Elfelejtett jelszó +

+
+ setEmail(e.target.value)} + /> +
+
+
+ ); +} diff --git a/SerpentRace_Frontend/src/pages/Auth/ResetPassword.jsx b/SerpentRace_Frontend/src/pages/Auth/ResetPassword.jsx new file mode 100644 index 00000000..1dccb19b --- /dev/null +++ b/SerpentRace_Frontend/src/pages/Auth/ResetPassword.jsx @@ -0,0 +1,61 @@ +// src/pages/Auth/ResetPassword.jsx +// Új jelszó megadása + +import { useState } from "react"; +import Background from "../../assets/backgrounds/Background"; +import { motion } from "framer-motion"; +import Button from "../../components/Buttons/Button"; +import InputBox from "../../components/Inputs/InputBox"; + +export default function ResetPassword() { + const [password, setPassword] = useState(""); + const [confirmPassword, setConfirmPassword] = useState(""); + const [error, setError] = useState(""); + + const handleSubmit = (e) => { + e.preventDefault(); + if (password !== confirmPassword) { + setError("A jelszavak nem egyeznek."); + return; + } + setError(""); + // Backend API + console.log("Új jelszó:", password); + }; + + return ( +
+ + +
+

+ Új jelszó megadása +

+
+ setPassword(e.target.value)} + /> + setConfirmPassword(e.target.value)} + /> + {error && ( +
{error}
+ )} +
+
+
+ ); +}