[Client] Improve featured notes page

This commit is contained in:
syuilo 2019-02-17 00:28:41 +09:00
parent f20b4a8ac1
commit 7c7fdfd077
3 changed files with 3 additions and 0 deletions

View file

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

View file

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

View file

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