mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-01 19:26:30 +02:00
🐛 Fix event ICS download button file content (#1390)
This commit is contained in:
parent
e592484616
commit
71dc64abf5
1 changed files with 2 additions and 4 deletions
|
@ -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`,
|
||||
|
|
Loading…
Add table
Reference in a new issue