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

@Component({
  selector: 'of-pages-confirm-signup',
  templateUrl: './confirm-signup-page.component.html',
})
export class ConfirmSignupPageComponent implements OnInit {
  token: string;

  constructor(
    private router: Router,
    private activatedRoute: ActivatedRoute,
  ) { }

  ngOnInit() {
    this.token = this.activatedRoute.snapshot.queryParams['token'];
    if (this.token === '' || this.token === null || this.token === undefined ) {
      // warning message print
      console.log('warning message print');
      this.router.navigate(['/']);
    }
  }

  onSignin() {
    this.router.navigate(['auth/signin']);
  }
}
