Projekt

Obecné

Profil

Stáhnout (640 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1 5231600c hlavja
import {Component, OnInit} from '@angular/core';
2 464309d9 hlavja
import {AuthService} from '../../../auth/services/auth.service';
3
import {Router} from '@angular/router';
4
import {UserState} from '../../../auth/states/user.state';
5
6
@Component({
7
  selector: 'app-nav-bar',
8
  templateUrl: './nav-bar.component.html',
9
  styleUrls: ['./nav-bar.component.scss']
10
})
11 675bbb8c hlavja
export class NavBarComponent implements OnInit {
12 464309d9 hlavja
13
  constructor(
14
    private authService: AuthService,
15
    private router: Router,
16
    private userState: UserState
17
  ) {
18
  }
19
20
  ngOnInit(): void {
21
  }
22
23
  logOut(): void {
24
    this.userState.setLoggedIn(false);
25
    this.authService.doLogout();
26
  }
27
}