32 lines
712 B
TypeScript
32 lines
712 B
TypeScript
import { Component } from '@angular/core';
|
|
import {LoginComponent} from "../../login/login.component";
|
|
import {NgIf} from "@angular/common";
|
|
import {RegisterComponent} from "../../register/register.component";
|
|
import {AuthService} from "../../../services/auth.service";
|
|
|
|
@Component({
|
|
selector: 'app-auth-form',
|
|
standalone: true,
|
|
imports: [
|
|
LoginComponent,
|
|
NgIf,
|
|
RegisterComponent
|
|
],
|
|
templateUrl: './auth-form.component.html',
|
|
styleUrl: './auth-form.component.scss'
|
|
})
|
|
export class AuthFormComponent {
|
|
|
|
constructor(private authService: AuthService) {
|
|
}
|
|
|
|
isLoggedIn = false;
|
|
|
|
ngOnInit() {
|
|
setTimeout(() => {
|
|
this.isLoggedIn = this.authService.isLoggedIn();
|
|
});
|
|
}
|
|
|
|
}
|