loginnal redirect ha jo a return plusz local storageban eltarolom a tokent

This commit is contained in:
2025-10-15 16:32:18 +02:00
parent f2b154d491
commit cf68530fc2
3 changed files with 42 additions and 12 deletions
@@ -51,12 +51,10 @@ export default function RegisterForm() {
// Check for 201 Created status
if (response && response.status === 201) {
navigate("/login", { state: { success: true } })
console.log(response)
console.log("Regisztráció:", { username, email, password, firstname, lastname, phone })
} else {
let msg = "Sikertelen regisztráció."
if (response && response.error) {
msg = response.error
if (response && response.data && response.data.error) {
msg = response.data.error
}
setError(msg)
setShowErrorPopup(true)