|
|
@@ -1,5 +1,3 @@
|
|
1
|
|
-// Artists/Exhibitions/Events/search-results
|
|
2
|
|
-// Optional sidebar
|
|
3
|
1
|
<template lang="pug">
|
|
4
|
2
|
.page--list.f-row.between
|
|
5
|
3
|
article.f-grow
|
|
|
@@ -36,14 +34,9 @@ export default {
|
|
36
|
34
|
allEpisodesLoaded: 'allEpisodesLoaded',
|
|
37
|
35
|
}),
|
|
38
|
36
|
posts() {
|
|
39
|
|
- switch (this.$route.params.type) {
|
|
40
|
|
- case 'artists':
|
|
41
|
|
- return this.allArtists
|
|
42
|
|
- break
|
|
43
|
|
- case 'episodes':
|
|
44
|
|
- return this.allEpisodes
|
|
45
|
|
- break
|
|
46
|
|
- }
|
|
|
37
|
+ let type = this.$route.params.type
|
|
|
38
|
+ type = type.charAt(0).toUpperCase() + type.slice(1)
|
|
|
39
|
+ return this[`all${type}`]
|
|
47
|
40
|
},
|
|
48
|
41
|
},
|
|
49
|
42
|
data() {
|
|
|
@@ -53,14 +46,9 @@ export default {
|
|
53
|
46
|
}
|
|
54
|
47
|
},
|
|
55
|
48
|
mounted() {
|
|
56
|
|
- switch (this.$route.params.type) {
|
|
57
|
|
- case 'artists':
|
|
58
|
|
- this.$store.dispatch('getAllArtists')
|
|
59
|
|
- break
|
|
60
|
|
- case 'episodes':
|
|
61
|
|
- this.$store.dispatch('getAllEpisodes')
|
|
62
|
|
- break
|
|
63
|
|
- }
|
|
|
49
|
+ let type = this.$route.params.type
|
|
|
50
|
+ type = type.charAt(0).toUpperCase() + type.slice(1)
|
|
|
51
|
+ this.$store.dispatch(`getAll${type}`)
|
|
64
|
52
|
}
|
|
65
|
53
|
}
|
|
66
|
54
|
</script>
|