Skip to content

Commit

Permalink
fix: Event creation (#594)
Browse files Browse the repository at this point in the history
* fix: Event creation

* fix: Remove double /
  • Loading branch information
LautaroPetaccio authored Dec 1, 2023
1 parent 5fd7948 commit bc30b36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/entities/Event/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { withPrefix } from "gatsby"

import Time from "decentraland-gatsby/dist/utils/date/Time"
import env from "decentraland-gatsby/dist/utils/env"
import padStart from "lodash/padStart"
Expand Down Expand Up @@ -39,7 +37,7 @@ export function profileSiteUrl(address: string) {

export function siteUrl(pathname = "") {
const target = new URL(EVENTS_BASE_URL)
target.pathname = withPrefix(pathname)
target.pathname = (target.pathname + pathname).replace(/\/+/g, "/")
return target
}

Expand Down Expand Up @@ -82,6 +80,7 @@ export function eventFacebookUrl(
return target.toString()
}

// TODO: This is used in the UI and the backend as well.
export function eventTwitterUrl(
event: Pick<EventAttributes, "id" | "description">
): string {
Expand Down
6 changes: 1 addition & 5 deletions src/pages/submit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ import { getSchedules, getSchedulesOptions } from "../../modules/events"
import { Flags } from "../../modules/features"
import locations from "../../modules/locations"
import { getServerOptions, getServers } from "../../modules/servers"
import {
getWorldNames,
getWorldNamesOptions,
getWorlds,
} from "../../modules/worlds"
import { getWorldNames, getWorldNamesOptions } from "../../modules/worlds"

import "./index.css"

Expand Down

0 comments on commit bc30b36

Please sign in to comment.