Skip to content

Commit 654615c

Browse files
committed
slide popularity slider once component mounted
1 parent 5cd2821 commit 654615c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

frontend/src/components/app/users/UserProfile.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ export default {
223223
async beforeMount() {
224224
this.checkIfUserIsLiked();
225225
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() {
226234
const sliderRangesRequest = await this.$http.get('/search/values');
227235
const maxScore = sliderRangesRequest.data.search_minmax.max_score;
228236
const sliderScore = document.getElementById('sliderScore');
@@ -233,12 +241,6 @@ export default {
233241
} else {
234242
sliderScore.style.marginLeft = `calc(${marginLeft} - ${sliderScoreWidth})`;
235243
}
236-
const interests = this.user.tags;
237-
if (interests) {
238-
for (let j = 0; j < interests.length; j += 1) {
239-
this.userInterests.push(interests[j].name);
240-
}
241-
}
242244
},
243245
};
244246
</script>

0 commit comments

Comments
 (0)