Get future news by removing filter
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Aditya Thakral 2021-09-12 01:00:37 -04:00
parent a921b7d090
commit 867b61f268
2 changed files with 8 additions and 11 deletions

View File

@ -1,6 +1,6 @@
--- ---
author: 'n3parikh' author: 'n3parikh'
date: 'Wed Sep 12 2021 01:00:00 GMT-0400 (Eastern Daylight Time)' date: 'Wed Sep 12 2021 00:00:00 GMT-0400 (Eastern Daylight Time)'
--- ---
📢 UWs Tech Clubs are proud to present to you Bootcamp! This event is a new initiative brought to you to help sharpen your resumes happening on September 19th from 6 PM to 10 PM ET. 📢 UWs Tech Clubs are proud to present to you Bootcamp! This event is a new initiative brought to you to help sharpen your resumes happening on September 19th from 6 PM to 10 PM ET.

View File

@ -91,12 +91,9 @@ export async function getRecentNews(): Promise<News[]> {
) )
).flat(); ).flat();
return news return news.sort((a, b) => {
.filter((news) => new Date(news.metadata.date).getTime() <= Date.now())
.sort((a, b) => {
return ( return (
new Date(b.metadata.date).getTime() - new Date(b.metadata.date).getTime() - new Date(a.metadata.date).getTime()
new Date(a.metadata.date).getTime()
); );
}); });
} }