Skip to content

Commit

Permalink
fix(app): add market path to referral link (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeifuChen authored Sep 15, 2023
1 parent 9bcf051 commit 9d6dc67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/app/src/constants/links.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CurrencyKey } from './currency'

export const PROD_HOSTNAME = 'kwenta.eth.limo'
export const PROD_REFFERAL_URL = 'kwenta.eth.limo/market'

export const EXTERNAL_LINKS = {
Trading: {
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/sections/referrals/ReferralCodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { DesktopOnlyView, MobileOrTabletView } from 'components/Media'
import Table from 'components/Table'
import { TableHeader } from 'components/Table'
import { Body } from 'components/Text'
import { PROD_HOSTNAME } from 'constants/links'
import { PROD_REFFERAL_URL } from 'constants/links'
import useIsL2 from 'hooks/useIsL2'
import { setOpenModal } from 'state/app/reducer'
import { selectShowModal } from 'state/app/selectors'
Expand Down Expand Up @@ -62,7 +62,7 @@ const ReferralCodes: FC<ReferralCodesProps> = memo(({ data }) => {
const y = event.clientY
const { protocol, hostname, port } = window.location
const fullUrl = `${protocol}//${
process.env.NEXT_PUBLIC_REF_URL_OVERRIDE === 'true' ? PROD_HOSTNAME : hostname
process.env.NEXT_PUBLIC_REF_URL_OVERRIDE === 'true' ? PROD_REFFERAL_URL : hostname
}${port ? `:${port}` : ``}/?ref=${text}`

navigator.clipboard.writeText(fullUrl).then(() => {
Expand Down

0 comments on commit 9d6dc67

Please sign in to comment.