mirror of
https://github.com/fabrice404/olympics-calendar.git
synced 2025-12-13 06:39:47 +00:00
fix: set lowercase sport & noc in calendar link
This commit is contained in:
@ -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`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user