feat: organize functions and add type to foods

This commit is contained in:
2025-09-07 16:33:56 -03:00
parent 3b09e33b2d
commit f8f2c98d49
8 changed files with 224 additions and 244 deletions
+18
View File
@@ -0,0 +1,18 @@
import { getDivById } from "./DomUtils";
export function showAuthForms() {
getDivById('auth-section').classList.remove('hidden');
getDivById('user-info').classList.add('hidden');
getDivById('app-content').classList.add('hidden');
}
export function toggleAuthForms() {
document.getElementById('login-form')?.classList.toggle('hidden');
document.getElementById('register-form')?.classList.toggle('hidden');
const logForm = document.getElementById('loginForm') as HTMLFormElement;
logForm.reset();
const resetForm = document.getElementById('registerForm') as HTMLFormElement;
resetForm.reset();
}