mirror of
https://github.com/Nezumi-2711/foodify-frontend.git
synced 2026-09-23 04:09:52 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user