fix: set lowercase sport & noc in calendar link

This commit is contained in:
Fabrice Lamant
2025-12-06 21:04:51 +01:00
parent a9d5b1d58e
commit f869a81ff1

View File

@ -91,8 +91,8 @@ export default function Home() {
const generateCalendarLink = () => {
const host = typeof window !== 'undefined' ? window.location.host : '';
const noc = qs.get('noc') || 'calendar';
const sport = qs.get('sport') || 'all-sports';
const noc = (qs.get('noc') || 'calendar').toLowerCase();
const sport = (qs.get('sport') || 'all-sports').toLowerCase();
return `http://${host}/api/data/${language}/${sport}/${noc}.ics`;
};