[Client] Improve featured notes page

This commit is contained in:
syuilo 2019-02-17 00:28:41 +09:00
parent ec3ca3032e
commit 562bb5842b
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
3 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,7 @@ export default Vue.extend({
this.$root.api('notes/featured', {
limit: 20,
}).then(notes => {
notes.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
res(notes);
this.fetching = false;
this.$emit('loaded');

View File

@ -30,6 +30,7 @@ export default Vue.extend({
this.$root.api('notes/featured', {
limit: 20
}).then(notes => {
notes.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
this.notes = notes;
this.fetching = false;

View File

@ -38,6 +38,7 @@ export default Vue.extend({
this.$root.api('notes/featured', {
limit: 20
}).then(notes => {
notes.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
this.notes = notes;
this.fetching = false;