mirror of
https://github.com/Nezumi-2711/foodify-frontend.git
synced 2026-09-22 20:01:17 +00:00
26 lines
629 B
TypeScript
26 lines
629 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { UserService } from 'src/app/shared/service/user.service';
|
|
import { User } from 'src/app/shared/tables/user';
|
|
|
|
@Component({
|
|
selector: 'app-profile',
|
|
templateUrl: './profile.component.html',
|
|
styleUrls: ['./profile.component.scss']
|
|
})
|
|
export class ProfileComponent implements OnInit {
|
|
public active = 1;
|
|
loggedId: number = Number(localStorage.getItem('user-id'))
|
|
user: User;
|
|
|
|
constructor(
|
|
private userService: UserService
|
|
) { }
|
|
|
|
ngOnInit() {
|
|
this.userService.getUserById(this.loggedId).subscribe((user) => {
|
|
this.user = user;
|
|
})
|
|
}
|
|
|
|
}
|