feat: add news sources, 30-day filter, and fix ticker performance
- Fix Al Jazeera RSS URL (feeds.aljazeera.com is dead, moved to www.aljazeera.com) - Add 8 new RSS sources: DW, France 24, Euronews, DW Africa, RFI, Africa News, NYT Africa, NPR — covering Germany, Europe, Africa, Cameroon region, and USA - Filter WHO outbreak news and ticker feed to last 30 days (drops stale alerts like 733-day-old WHO DONs) - Fix ticker causing Chrome to crash: add will-change:transform and contain:layout style for GPU compositing, reduce DOM nodes from 80 to 40 - Add badge styles for new source categories (DW, EU, Africa)
This commit is contained in:
@@ -51,7 +51,11 @@ export async function getOutbreakNews() {
|
||||
return db - da;
|
||||
});
|
||||
|
||||
return items.map(item => ({
|
||||
// Filter to last 30 days only
|
||||
const cutoff = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000);
|
||||
const recent = items.filter(item => new Date(item.PublicationDate || 0) >= cutoff);
|
||||
|
||||
return recent.map(item => ({
|
||||
title: item.Title,
|
||||
date: item.PublicationDate,
|
||||
donId: item.DonId || null,
|
||||
|
||||
Reference in New Issue
Block a user