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:
Ketchalegend
2026-03-16 16:21:17 +01:00
committed by calesthio
parent 3fed206e59
commit ba9e93679f
3 changed files with 37 additions and 10 deletions

View File

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