import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { RouterModule } from '@angular/router';
import { KeycloakService } from 'keycloak-angular';

@Component({
  selector: 'logout',
  standalone: true,
  imports: [CommonModule, RouterModule],
  template: ``,
})
export class LogoutComponent {
  constructor(public keycloakService: KeycloakService) {
    sessionStorage.removeItem('USERID');
    keycloakService.logout(window.location.origin + '/home');
  }
}
