import {Component} from '@angular/core';
import {Router} from '@angular/router';
import {UserService} from '../service-user/user.service';

@Component({
  selector: 'app-page-info',
  templateUrl: './page-info.component.html',
  styleUrls: ['./page-info.component.scss']
})
export class PageInfoComponent {
  constructor(
    public userServ: UserService,
    private router: Router
  ) {
    this.userInfo = this.userServ.currentUser;
  }

  userInfo: any = {}

  saveInfo() {
    this.userServ.currentUser = this.userInfo;
    this.router.navigate(["/home/mine"])
  }
}
