|
|
@@ -71,7 +71,7 @@ export default {
|
|
71
|
71
|
this.page++
|
|
72
|
72
|
this.getPosts(false)
|
|
73
|
73
|
},
|
|
74
|
|
- getPosts(clear) {
|
|
|
74
|
+ async getPosts(clear) {
|
|
75
|
75
|
// Limit
|
|
76
|
76
|
let params = {
|
|
77
|
77
|
limit: this.perPage,
|
|
|
@@ -89,7 +89,7 @@ export default {
|
|
89
|
89
|
let dispatchAction = `getAll${this.pType}`
|
|
90
|
90
|
|
|
91
|
91
|
if(dispatchAction && clear) {
|
|
92
|
|
- if (this.type && ['event', 'exhibitions'].includes(this.type)) {
|
|
|
92
|
+ if (this.type && ['event', 'exhibition'].includes(this.type)) {
|
|
93
|
93
|
dispatchParams.sortType = sortTypes.currentAndUpcoming
|
|
94
|
94
|
}
|
|
95
|
95
|
}
|
|
|
@@ -97,10 +97,10 @@ export default {
|
|
97
|
97
|
else if (!clear && this.type != 'episode') {
|
|
98
|
98
|
dispatchAction = `getMore${this.pType}`
|
|
99
|
99
|
}
|
|
100
|
|
- const res = this.$store.dispatch(dispatchAction, dispatchParams)
|
|
|
100
|
+ const res = await this.$store.dispatch(dispatchAction, dispatchParams)
|
|
101
|
101
|
|
|
102
|
102
|
console.log('responded:', res)
|
|
103
|
|
- if(res.length < 1) {
|
|
|
103
|
+ if(!res) {
|
|
104
|
104
|
console.warn('nothing left to get...')
|
|
105
|
105
|
}
|
|
106
|
106
|
},
|
|
|
@@ -184,7 +184,7 @@ export default {
|
|
184
|
184
|
this.setIntersectionLoader()
|
|
185
|
185
|
},
|
|
186
|
186
|
created() {
|
|
187
|
|
- this.checkAndSetHero(this.pType)
|
|
|
187
|
+ this.checkAndSetHero(this.type)
|
|
188
|
188
|
|
|
189
|
189
|
// We also need to check if only ONE has been loaded because
|
|
190
|
190
|
// coming from the homepage there will only be 1 item
|