Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
fix ics download button (#1381)
Alexander Mnich874c4d145358
diff --git a/apps/web/src/components/add-to-calendar-button.tsx b/apps/web/src/components/add-to-calendar-button.tsxindex 83a5e8e3d..c553e5725 100644--- a/apps/web/src/components/add-to-calendar-button.tsx+++ b/apps/web/src/components/add-to-calendar-button.tsx@@ -57,24 +57,7 @@ export function AddToCalendarButton({return (<DropdownMenu><DropdownMenuTrigger asChild>- <Button- onClick={() => {- const res = 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(- "download",- `${title.toLocaleLowerCase().replace(/\s/g, "-")}.ics`,- );- document.body.appendChild(link);- link.click();- document.body.removeChild(link);- }}- >+ <Button><Icon><PlusIcon /></Icon>@@ -134,7 +117,24 @@ export function AddToCalendarButton({<Trans i18nKey="yahoo" defaults="Yahoo" /></DropdownMenuItem><DropdownMenuSeparator />- <DropdownMenuItem>+ <DropdownMenuItem+ onClick={() => {+ const res = 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(+ "download",+ `${title.toLocaleLowerCase().replace(/\s/g, "-")}.ics`,+ );+ document.body.appendChild(link);+ link.click();+ document.body.removeChild(link);+ }}+ ><Icon><DownloadIcon /></Icon>