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

@Component({
  selector: 'app-not-authorized-page',
  templateUrl: './not-authorized-page.component.html',
  styleUrls: ['./not-authorized-page.component.scss']
})
export class NotAuthorizedPageComponent implements OnInit {

  constructor(private activatedRoute: ActivatedRoute, private router: Router, private location: Location) { 
    this.activatedRoute.queryParams.subscribe(params => {
      let errorUrl = params['fromUrl'];
      this.location.replaceState(errorUrl);
    });
  }

  ngOnInit(): void {
  }

}
