Sort by newest news & display human readable date

This commit is contained in:
Sveske_Juice 2024-02-22 00:59:46 +01:00
parent c7fb3f7945
commit 81ffeaa780
3 changed files with 15 additions and 2 deletions

View file

@ -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,