Refactor popular page V2

This commit is contained in:
Mykyta Poturai 2020-08-22 23:10:52 +03:00
parent 5bc2e70e88
commit 60a315f360
2 changed files with 4 additions and 7 deletions

View File

@ -26,14 +26,11 @@ export default Vue.extend({
mounted: function () { mounted: function () {
this.shownResults = this.popularCache this.shownResults = this.popularCache
if (!this.shownResults || this.shownResults.length < 1) { if (!this.shownResults || this.shownResults.length < 1) {
this.fetchTrendingInfo() this.fetchPopularInfo()
} }
}, },
methods: { methods: {
refreshTrendingInfo: function () { fetchPopularInfo: async function () {
this.fetchTrendingInfo()
},
fetchTrendingInfo: async function () {
const searchPayload = { const searchPayload = {
resource: 'popular', resource: 'popular',
id: '', id: '',

View File

@ -17,8 +17,8 @@
icon="sync" icon="sync"
class="floatingTopButton" class="floatingTopButton"
:size="12" :size="12"
:theme="primary" theme="primary"
@click="refreshTrendingInfo" @click="fetchPopularInfo"
/> />
</div> </div>
</template> </template>