File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
frontend/src/components/app/users Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 77 <h1 class =" noSelect" >←</h1 >
88 </div >
99 <div v-if =" user" class =" md:flex md:items-start" >
10- <UserImages v-bind:images =" user.images" class =" md:w-7/12 md:order-2 sm:rounded-t md:rounded-r-md md:rounded-l-none" ></UserImages >
10+ <UserImages v-bind:images =" user.images" v-bind:gender = " user.gender " class =" md:w-7/12 md:order-2 sm:rounded-t md:rounded-r-md md:rounded-l-none" ></UserImages >
1111 <UserProfile class =" md:w-5/12 md:order-1 md:overflow-scroll md:border-b md:border-l md:rounded-l-md" v-bind:user =" user" ></UserProfile >
1212 </div >
1313 </section >
Original file line number Diff line number Diff line change 11<template >
2- <!-- eslint-disable max-len-->
3- <!-- v-for="(image, index) in this.images" :key="image.id"-->
42 <div
53 class =" relative image-height"
64 v-bind:style =" {
3836</template >
3937
4038<script >
39+ import imageMan from ' ../../../assets/recommendations/avatars/man1.png' ;
40+ import imageWoman from ' ../../../assets/recommendations/avatars/woman1.png' ;
41+ import imageOther from ' ../../../assets/recommendations/avatars/other.png' ;
42+
4143export default {
42- props: [' images' ],
44+ props: [' images' , ' gender ' ],
4345 data : () => ({
4446 currentImage: 0 ,
4547 imagesCount: 0 ,
@@ -59,7 +61,16 @@ export default {
5961 this .currentImage = index;
6062 },
6163 getImage () {
62- return this .images [this .currentImage ].link ;
64+ if (this .images .length ) {
65+ return this .images [this .currentImage ].link ;
66+ }
67+ if (this .gender === ' male' ) {
68+ return imageMan;
69+ }
70+ if (this .gender === ' female' ) {
71+ return imageWoman;
72+ }
73+ return imageOther;
6374 },
6475 },
6576 beforeMount () {
You can’t perform that action at this time.
0 commit comments