Skip to content

Commit

Permalink
fix: [communauté] modifie l'image des utilisateurs pour afficher l'im…
Browse files Browse the repository at this point in the history
…age enregistrée
  • Loading branch information
matthieuaudemard committed Nov 16, 2021
1 parent c5466c4 commit 47718a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<div class="col mb-3">
<div class="card align-items-center pt-5 shadow-sm border-0 user-card">
<img
#userImage
(error)="userImage.src = constant.USER_DEFAULT_IMAGE_SRC"
[src]="user.imageUrl || constant.USER_DEFAULT_IMAGE_SRC"
alt="photo de {{user.firstname}} {{user.lastname}}"
class="rounded-circle img-fluid shadow-sm user-avatar"
src="assets/img/default-user.png"
/>
<div class="card-body text-center w-100">
<h5 class="card-title overflow-ellipsis">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.user-avatar {
width: 100px;
height: auto;
height: 100px;
}

.user-card {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Component, Input} from '@angular/core';
import {User} from '../../../shared/models/user';
import {Constants} from '../../../config/constants';

@Component({
selector: 'app-user-card',
Expand All @@ -11,4 +12,6 @@ export class UserCardComponent {
@Input()
user: User;

constant = Constants;

}

0 comments on commit 47718a5

Please sign in to comment.