import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

import { AuthService } from '../core/services/auth.service';

@Component({
  selector: 'app-disconnection',
  template: 'Déconnexion...'
})
export class DisconnectionComponent implements OnInit {

  constructor(
    private authService: AuthService,
    private router: Router
  ) {}

  ngOnInit(): void {
    this.authService.disconnect();
    this.router.navigate(['/server']);
  }
}
