added logout on login
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Component, inject, signal, viewChild} from '@angular/core';
|
||||
import {Component, inject, OnInit, signal, viewChild} from '@angular/core';
|
||||
import {IonicModule, NavController, ToastController} from "@ionic/angular";
|
||||
import {SignInFormComponent} from "../../components/sign-in-form/sign-in-form.component";
|
||||
import {SignOnFormComponent} from "../../components/sign-on-form/sign-on-form.component";
|
||||
@@ -16,7 +16,7 @@ import {UsersService} from "../../services/api";
|
||||
SignOnFormComponent
|
||||
]
|
||||
})
|
||||
export class LoginComponent {
|
||||
export class LoginComponent implements OnInit {
|
||||
authState = signal<boolean>(true)
|
||||
errorMessage = signal<string | null>(null);
|
||||
login = viewChild<SignInFormComponent>('loginForm');
|
||||
@@ -27,6 +27,10 @@ export class LoginComponent {
|
||||
private navCtrl = inject(NavController);
|
||||
private toastCtrl = inject(ToastController);
|
||||
|
||||
ngOnInit() {
|
||||
this.authManageService.logout();
|
||||
}
|
||||
|
||||
async createAccount() {
|
||||
if (this.authState()) {
|
||||
this.authState.set(false);
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Be Ready</title>
|
||||
<title>BeReady</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="BeReady.png">
|
||||
|
||||
Reference in New Issue
Block a user