3535 class =" px-4 py-1 border rounded-xl mr-2 mt-2 text-gray-600 text-sm" >{{interest}}</h1 >
3636 </div >
3737 </div >
38- <div class =" text-center flex flex-col mx-auto p-8 border-b" >
38+ <div v-if = " avatarsUploaded() " class =" text-center flex flex-col mx-auto p-8 border-b" >
3939 <LikeButton
4040 v-if =" !likeButtons.superLikeClicked"
4141 v-bind:hasBeenClicked =" likeButtons.likeClicked"
@@ -120,6 +120,10 @@ export default {
120120 blocked: false ,
121121 }),
122122 methods: {
123+ avatarsUploaded () {
124+ return this .user .images .length > 0
125+ && this .$store .getters .getLoggedInUser .images .length > 0 ;
126+ },
123127 preferences () {
124128 if (this .user .orientation === ' heterosexual' && this .user .gender === ' male' ) {
125129 return ' women' ;
@@ -219,6 +223,14 @@ export default {
219223 async beforeMount () {
220224 this .checkIfUserIsLiked ();
221225 this .checkIfUserIsBlocked ();
226+ const interests = this .user .tags ;
227+ if (interests) {
228+ for (let j = 0 ; j < interests .length ; j += 1 ) {
229+ this .userInterests .push (interests[j].name );
230+ }
231+ }
232+ },
233+ async mounted () {
222234 const sliderRangesRequest = await this .$http .get (' /search/values' );
223235 const maxScore = sliderRangesRequest .data .search_minmax .max_score ;
224236 const sliderScore = document .getElementById (' sliderScore' );
@@ -229,12 +241,6 @@ export default {
229241 } else {
230242 sliderScore .style .marginLeft = ` calc(${ marginLeft} - ${ sliderScoreWidth} )` ;
231243 }
232- const interests = this .user .tags ;
233- if (interests) {
234- for (let j = 0 ; j < interests .length ; j += 1 ) {
235- this .userInterests .push (interests[j].name );
236- }
237- }
238244 },
239245};
240246 </script >
0 commit comments