From fcce15154b5a9c64142cc144f57532015bdbacea Mon Sep 17 00:00:00 2001 From: daiagi Date: Tue, 17 Oct 2023 10:00:10 +0700 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=90=9B=20broken=20explorer=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ItemsGrid/ItemsGridImageTokenEntity.vue | 7 +++++++ .../components/NeoNftCard/NFTMediaInfo.vue | 6 +++--- .../NeoNftCard/NFTMediaInfoStacked.vue | 6 +++--- .../src/components/NeoNftCard/NeoNftCard.vue | 19 +++++++++---------- libs/ui/src/components/NeoNftCard/types.ts | 16 ++++++++++++++++ 5 files changed, 38 insertions(+), 16 deletions(-) create mode 100644 libs/ui/src/components/NeoNftCard/types.ts diff --git a/components/items/ItemsGrid/ItemsGridImageTokenEntity.vue b/components/items/ItemsGrid/ItemsGridImageTokenEntity.vue index c98dc0ab7a..2f50a53d49 100644 --- a/components/items/ItemsGrid/ItemsGridImageTokenEntity.vue +++ b/components/items/ItemsGrid/ItemsGridImageTokenEntity.vue @@ -2,6 +2,7 @@ props.entity), ) +const linkTo = computed(() => + isStack.value + ? `/${urlPrefix.value}/collection/${props.entity.collection.id}` + : `/${urlPrefix.value}/gallery/${props.entity.cheapest.id}`, +) + const variant = computed(() => isStack.value ? `stacked-${props.variant}` : props.variant, ) diff --git a/libs/ui/src/components/NeoNftCard/NFTMediaInfo.vue b/libs/ui/src/components/NeoNftCard/NFTMediaInfo.vue index 28486f10c3..26d65b3054 100644 --- a/libs/ui/src/components/NeoNftCard/NFTMediaInfo.vue +++ b/libs/ui/src/components/NeoNftCard/NFTMediaInfo.vue @@ -32,7 +32,7 @@ ]"> {{ getChainNameByPrefix(prefix) @@ -44,10 +44,10 @@ import CommonTokenMoney from '@/components/shared/CommonTokenMoney.vue' import { getChainNameByPrefix } from '@/utils/chain' import { NftCardVariant } from '@kodadot1/brick' -import { NFTWithMetadata } from '@/composables/useNft' +import { NeoNFT } from './types' const props = withDefaults( defineProps<{ - nft: NFTWithMetadata | TokenEntity + nft: NeoNFT prefix: string showPrice?: boolean collectionPopoverShowDelay?: number diff --git a/libs/ui/src/components/NeoNftCard/NFTMediaInfoStacked.vue b/libs/ui/src/components/NeoNftCard/NFTMediaInfoStacked.vue index 92ce6a83cf..e039c97ab8 100644 --- a/libs/ui/src/components/NeoNftCard/NFTMediaInfoStacked.vue +++ b/libs/ui/src/components/NeoNftCard/NFTMediaInfoStacked.vue @@ -16,7 +16,7 @@
{{ $t('lowestPrice') }}:
@@ -53,11 +53,11 @@