Fix: InfoAlert

correjido que no llegaba el estado del alert a la pagina de login
This commit is contained in:
2025-11-14 22:18:20 -03:00
parent e5f9a6f1ec
commit 5c6415c41e
3 changed files with 42 additions and 17 deletions

View File

@@ -1,5 +1,4 @@
import { apiBase } from "@/stores/url";
import { sesionStore } from "@/stores/usuario";
import { goto } from "$app/navigation";
import type { RegisterDto } from "../../types";
@@ -24,9 +23,7 @@ export async function register(e:FormDataEvent,dto: RegisterDto, callbackfn:()=>
});
if (req.ok) {
const data= await req.json();
goto("/login", { state: {
message: data.message,
}});
goto("/login?msg="+data.message);
} else {
callbackfn();
}