Sort by newest news & display human readable date
This commit is contained in:
parent
c7fb3f7945
commit
81ffeaa780
3 changed files with 15 additions and 2 deletions
|
@ -17,6 +17,9 @@ type Summary = {
|
|||
export function load() {
|
||||
let summaries : Summary[] = [];
|
||||
|
||||
// Sort by newest news first
|
||||
posts.sort((a, b) => b.creation_date - a.creation_date);
|
||||
|
||||
posts.map((post) => {
|
||||
let summary : Summary = {
|
||||
url: post.url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue