feat(checada): el link "Regístrate" abre becario.html en la pestaña de registro

checada.html pasa ?registro=1; becario.html lee el parámetro y arranca el
componente Acceso en modo "registro". Sin el parámetro sigue abriendo en "Entrar".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jorem JuárezandClaude Fable 5 committed 2026-07-06 08:46:44 -06:00
1 parent 7ab827ea44
commit 74fb2d17c4
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -75,7 +75,9 @@ const ErrorBar = ({ error, onClose }) => !error ? null : (
// ═══════════════ Login / Registro ═══════════════ // ═══════════════ Login / Registro ═══════════════
function Acceso({ onEntra }) { function Acceso({ onEntra }) {
const [modo, setModo] = useState("login"); const [modo, setModo] = useState(() =>
new URLSearchParams(window.location.search).get("registro") === "1" ? "registro" : "login"
);
const [f, setF] = useState({ telefono: "", password: "", nombre: "" }); const [f, setF] = useState({ telefono: "", password: "", nombre: "" });
const [error, setError] = useState(null); const [error, setError] = useState(null);
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
+1 -1
View File
@@ -94,7 +94,7 @@ function LoginInline({ onEntra }) {
<Btn type="submit" disabled={busy || f.telefono.length !== 10 || !f.password}>{busy ? "…" : "Entrar"}</Btn> <Btn type="submit" disabled={busy || f.telefono.length !== 10 || !f.password}>{busy ? "…" : "Entrar"}</Btn>
</form> </form>
<p style={{ textAlign: "center", marginTop: "14px", marginBottom: 0, fontSize: "13px" }}> <p style={{ textAlign: "center", marginTop: "14px", marginBottom: 0, fontSize: "13px" }}>
<a href="/becario.html" style={{ color: COLORS.primary }}>¿No tienes cuenta? Regístrate</a> <a href="/becario.html?registro=1" style={{ color: COLORS.primary }}>¿No tienes cuenta? Regístrate</a>
</p> </p>
</Card> </Card>
); );