From 71dc64abf5215673f86c0c9d94e5766f06749f0f Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 11 Oct 2024 18:30:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20event=20ICS=20download=20b?= =?UTF-8?q?utton=20file=20content=20(#1390)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/components/add-to-calendar-button.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/add-to-calendar-button.tsx b/apps/web/src/components/add-to-calendar-button.tsx index c553e5725be..b4bb10c0f95 100644 --- a/apps/web/src/components/add-to-calendar-button.tsx +++ b/apps/web/src/components/add-to-calendar-button.tsx @@ -119,13 +119,11 @@ export function AddToCalendarButton({ { - const res = ics(calendarEvent); + const data = ics(calendarEvent); // download the file - const blob = new Blob([res], { type: "text/calendar" }); - const url = URL.createObjectURL(blob); const link = document.createElement("a"); - link.setAttribute("href", url); + link.setAttribute("href", data); link.setAttribute( "download", `${title.toLocaleLowerCase().replace(/\s/g, "-")}.ics`,