onLogin(): void {
if (this.form) {
const email = this.form.get('formEmail')?.value;
const password = this.form.get('formPassword')?.value;
this.auth
.signInWithEmailAndPassword(email as string, password as string)
.then(() => this.router.navigate(['/']));
}
}
onLogout(): void {
this.auth
.signOut()
.then(() => {})
.catch((error) => {
console.error('Error during logout:', error);
});
}