Skip to content

Commit

Permalink
Merge branch 'main' into cf-upgrade-pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiival authored Jun 19, 2024
2 parents cc98128 + 4cf13a2 commit 5307b8c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
20.14.0
2 changes: 1 addition & 1 deletion components/profile/ProfileDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
{{ buttonConfig.label }}
</NeoButton>
<!-- Wallet And Links Dropdown -->
<NeoDropdown position="bottom-left">
<NeoDropdown position="bottom-auto">
<template #trigger="{ active }">
<NeoButton
variant="outlined-rounded"
Expand Down
1 change: 0 additions & 1 deletion pages/[prefix]/drops/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<script lang="ts" setup>
import { useDrop } from '@/components/drops/useDrops'
import UnlockableCollectionBanner from '@/components/collection/unlockable/UnlockableCollectionBanner.vue'
import { isProduction } from '@/utils/chain'
definePageMeta({
layout: 'unlockable-mint-layout',
Expand Down
7 changes: 3 additions & 4 deletions services/fxart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { $fetch, FetchError } from 'ofetch'
import type { DropItem } from '@/params/types'
import { Prefix } from '@kodadot1/static'

const BASE_URL =
window.location.host === 'kodadot.xyz'
? 'https://fxart.kodadot.workers.dev/'
: 'https://fxart-beta.kodadot.workers.dev/'
const BASE_URL = isProduction
? 'https://fxart.kodadot.workers.dev/'
: 'https://fxart-beta.kodadot.workers.dev/'

export const DYNAMIC_METADATA = 'fxart-beta.kodadot.workers.dev/metadata/'

Expand Down
8 changes: 4 additions & 4 deletions services/profile.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { $fetch, FetchError } from 'ofetch'
import { isEthereumAddress } from '@polkadot/util-crypto'
const BASE_URL =
window.location.host === 'kodadot.xyz'
? 'https://profile.kodadot.workers.dev/'
: 'https://profile-beta.kodadot.workers.dev/'

const BASE_URL = isProduction
? 'https://profile.kodadot.workers.dev/'
: 'https://profile-beta.kodadot.workers.dev/'

const api = $fetch.create({
baseURL: BASE_URL,
Expand Down
3 changes: 0 additions & 3 deletions utils/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export const getChainName = (prefix: Prefix) => {
return NAMES[prefix].replace(' [Beta]', '')
}

export const isProduction = window.location.hostname === 'kodadot.xyz'
export const isBeta = window.location.hostname === 'beta.kodadot.xyz'

export const disableChains = ['dot']
export const disableChainListOnBetaEnv = ['dot'] // 'ahr'

Expand Down
3 changes: 1 addition & 2 deletions utils/config/ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export type IPFSProviders =
| 'kodadot'
| 'image'

export const kodaImage =
window.location.host === 'kodadot.xyz' ? SERVICES.image : SERVICES.imageBeta
export const kodaImage = isProduction ? SERVICES.image : SERVICES.imageBeta

const ipfsProviders: Partial<Record<IPFSProviders, string>> = {
pinata: 'https://kodadot.mypinata.cloud/',
Expand Down
6 changes: 6 additions & 0 deletions utils/env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const isProduction = ['kodadot.xyz', 'koda.art'].includes(
window.location.hostname,
)
export const isBeta = ['beta.kodadot.xyz', 'beta.koda.art'].includes(
window.location.hostname,
)

0 comments on commit 5307b8c

Please sign in to comment.