diff --git a/src/vue/components/ArticleList.vue b/src/vue/components/ArticleList.vue index e044b4ea0f..b6dd8eff73 100644 --- a/src/vue/components/ArticleList.vue +++ b/src/vue/components/ArticleList.vue @@ -60,7 +60,7 @@ export default { "articles_count", "is_loading", ]), - listConfig() { + params() { const { type } = this; const filters = { offset: (this.currentPage - 1) * this.itemsPerPage, @@ -91,7 +91,7 @@ export default { }, watch: { currentPage(newValue) { - this.listConfig.filters.offset = (newValue - 1) * this.itemsPerPage; + this.params.filters.offset = (newValue - 1) * this.itemsPerPage; this.fetchArticles(); }, type() { @@ -116,10 +116,10 @@ export default { }, methods: { fetchArticles() { - this.$store.dispatch("fetchArticles", this.listConfig); + this.$store.dispatch("fetchArticles", this.params.filters); }, resetPagination() { - this.listConfig.offset = 0; + this.params.offset = 0; this.currentPage = 1; } } diff --git a/src/vue/routes/Profile.vue b/src/vue/routes/Profile.vue index fd794b6442..97bbac915b 100644 --- a/src/vue/routes/Profile.vue +++ b/src/vue/routes/Profile.vue @@ -38,37 +38,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
+
+
+ +
+ +
+
+
diff --git a/src/vue/store/actions.js b/src/vue/store/actions.js index 43c43cec19..2816bb7b0f 100644 --- a/src/vue/store/actions.js +++ b/src/vue/store/actions.js @@ -37,11 +37,11 @@ export default { context.dispatch("unsetUser"); }, - fetchArticles({ commit }, offset) { + fetchArticles({ commit }, params) { return new Promise((resolve) => { axios .get("/articles", { - offset: offset + filters: params.filters, }) .then(({ data }) => { resolve(data)