Miscellaneous lint fixes: move watch & mounted properties; apply automatic fixes (#12791)

* commit lint's automatic fixes

* move watch and mounted properties as advised in lint warnings
This commit is contained in:
Alys
2020-11-24 07:14:14 +10:00
committed by GitHub
parent 8bd2e09bde
commit 9b76f9831e
9 changed files with 67 additions and 63 deletions

View File

@@ -384,16 +384,6 @@ export default {
memberResults: [],
};
},
watch: {
'challenge.name': {
handler (newVal) {
this.$store.dispatch('common:setTitle', {
section: this.$t('challenge'),
subSection: newVal.name,
});
},
},
},
computed: {
...mapState({ user: 'user.data' }),
isMember () {
@@ -410,6 +400,16 @@ export default {
return !this.isMember;
},
},
watch: {
'challenge.name': {
handler (newVal) {
this.$store.dispatch('common:setTitle', {
section: this.$t('challenge'),
subSection: newVal.name,
});
},
},
},
mounted () {
if (!this.searchId) this.searchId = this.challengeId;
if (!this.challenge._id) this.loadChallenge();