import { Component, OnInit } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; import { AppService } from "../../../app.service"; import { lastValueFrom } from "rxjs"; import { API } from "../../../@config/app"; @Component({ selector: "app-index", templateUrl: "./index.component.html", styleUrls: [] }) export class IndexComponent implements OnInit { title = ""; auth : any = {}; constructor(public router: Router, private route: ActivatedRoute, private app: AppService) { } ngOnInit() { this.auth = this.app.auth(); if (!this.auth) return; if (this.auth.userType === "ADMIN") { return this.router.navigate(["/pages/appraisal/1st-time"]); } return ; } }