Monir fixes

This commit is contained in:
2025-06-22 16:04:17 +03:00
parent 3310df5df4
commit 94d377c0c2
5 changed files with 21 additions and 29 deletions

View File

@@ -1,10 +1,16 @@
const login_form = document.getElementById("login-form");
const login_button = document.getElementById("login-button");
const signup_form = document.getElementById("signup-form");
const signup_button = document.getElementById("signup-button");
login_button.onclick = () => {
document.getElementById("login").style.display = "block";
};
signup_button.onclick = () => {
document.getElementById("signup").style.display = "block";
};
login_form.onsubmit = async (e) => {
e.preventDefault();
const username = login_form.username.value;
@@ -20,13 +26,6 @@ login_form.onsubmit = async (e) => {
document.getElementById("login-info").innerText = response.message;
};
const signup_form = document.getElementById("signup-form");
const signup_button = document.getElementById("signup-button");
signup_button.onclick = () => {
document.getElementById("signup").style.display = "block";
};
signup_form.onsubmit = async (e) => {
e.preventDefault();
const username = signup_form.username.value;