constructor()

in genai-for-marketing/frontend/src/app/user-photo/user-photo.component.ts [24:40]


  constructor(private _router: Router, public dialog: Dialog, public loginService: LoginService) {
    this.userSubscription = this.user$.subscribe((aUser: User | null) => {
      //handle user state changes here. Note, that user will be null if there is no currently logged in user
      if (aUser) {
        this.dialog.closeAll();
        this.userLoggedIn = true;
        this.loginService.sendUserDetails(aUser)
        if (aUser.photoURL) {
          this.photoURL = aUser.photoURL;
        }
      }
      else {
        this.userLoggedIn = false;
        this.ngAfterViewInit()
      }
    })
  }