diff --git a/src/components/Button/AttendingButtons.tsx b/src/components/Button/AttendingButtons.tsx index 65aec30f..0a2bc2ae 100644 --- a/src/components/Button/AttendingButtons.tsx +++ b/src/components/Button/AttendingButtons.tsx @@ -181,10 +181,7 @@ export default function AttendingButtons(props: AttendingButtonsProps) { e.stopPropagation() e.preventDefault() if (event) { - window.open( - env("DECENTRALAND_DOWNLOAD_URL", "https://decentraland.org/download"), - "_blank" - ) + window.open(locations.download(event.id), "_blank") } }, [event, track, servers, hasDecentralandLauncher] diff --git a/src/components/Button/JumpInPosition.tsx b/src/components/Button/JumpInPosition.tsx index df15b302..c3461f0b 100644 --- a/src/components/Button/JumpInPosition.tsx +++ b/src/components/Button/JumpInPosition.tsx @@ -11,6 +11,7 @@ import { eventClientOptions } from "../../entities/Event/utils" import primaryJumpInIcon from "../../images/primary-jump-in.svg" import secondaryPinIcon from "../../images/secondary-pin-small.svg" import { launchDesktopApp } from "../../modules/desktop" +import locations from "../../modules/locations" import { SegmentEvent } from "../../modules/segment" import { getReamls } from "../../modules/servers" import DownloadModal from "../Modal/DownloadModal" @@ -65,10 +66,7 @@ export default function JumpInPosition({ e.stopPropagation() e.preventDefault() if (event) { - window.open( - env("DECENTRALAND_DOWNLOAD_URL", "https://decentraland.org/download"), - "_blank" - ) + window.open(locations.download(event.id), "_blank") } }, [event, track, servers, hasDecentralandLauncher] diff --git a/src/modules/locations.ts b/src/modules/locations.ts index b7ff127a..37870a58 100644 --- a/src/modules/locations.ts +++ b/src/modules/locations.ts @@ -1,4 +1,5 @@ import API from "decentraland-gatsby/dist/utils/api/API" +import env from "decentraland-gatsby/dist/utils/env" import { EventTimeReference, EventType } from "../entities/Event/types" import { @@ -126,4 +127,12 @@ export default { settings: () => url("/settings/"), docs: () => url("/docs/"), + + download: (id: string) => { + const url = new URL( + env("DECENTRALAND_DOWNLOAD_URL", "https://decentraland.org/download") + ) + url.searchParams.set("event", id) + return url.toString() + }, }