Get future news by removing filter
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a921b7d090
commit
867b61f268
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
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)'
|
||||
---
|
||||
📢 UW’s 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.
|
||||
|
||||
|
|
13
lib/news.ts
13
lib/news.ts
|
@ -91,12 +91,9 @@ export async function getRecentNews(): Promise<News[]> {
|
|||
)
|
||||
).flat();
|
||||
|
||||
return news
|
||||
.filter((news) => new Date(news.metadata.date).getTime() <= Date.now())
|
||||
.sort((a, b) => {
|
||||
return (
|
||||
new Date(b.metadata.date).getTime() -
|
||||
new Date(a.metadata.date).getTime()
|
||||
);
|
||||
});
|
||||
return news.sort((a, b) => {
|
||||
return (
|
||||
new Date(b.metadata.date).getTime() - new Date(a.metadata.date).getTime()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue