Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Fix event ICS download button file content (#1390)

Simon71dc64abf521
diff --git a/apps/web/src/components/add-to-calendar-button.tsx b/apps/web/src/components/add-to-calendar-button.tsx
index c553e5725..b4bb10c0f 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({
<DropdownMenuSeparator />
<DropdownMenuItem
onClick={() => {
- 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`,