diff --git a/frontend/marketplace/src/components/AuctionResultsCard.vue b/frontend/marketplace/src/components/AuctionResultsCard.vue index 3e70745d..ade2b744 100644 --- a/frontend/marketplace/src/components/AuctionResultsCard.vue +++ b/frontend/marketplace/src/components/AuctionResultsCard.vue @@ -2,9 +2,14 @@ import type { MarketplaceListing } from "@/types/GraphqlSchema"; import router from "@/router"; import auctionCard from "@/assets/auctionCard.png"; -import { getDetailsList } from "@/utils/utils"; +import { + getDetailsList, + prettifyCardProperty, + stripPlasticTypeFromMaterial, + findPlasticTypeInMaterial, +} from "@/utils/utils"; import { formatDenom } from "@/utils/wallet-utils"; -import { onMounted, ref } from "vue"; +import { computed, onMounted, ref } from "vue"; import CustomImage from "@/components/CustomImage.vue"; export interface AuctionResultsCardProps { @@ -13,11 +18,34 @@ export interface AuctionResultsCardProps { }; } +interface CardDetailsList { + applicant: string[]; + location: string[]; + material: { + key: string; + value: string; + }[][]; + volume: number; + thumbnailUrl: string; + image: string[]; + locationPointers: { + lat: number; + lng: number; + }[]; +} + const props = defineProps(); const denom = ref(""); +const cardDetailsList = ref(); +const applicant = computed(() => { + return cardDetailsList.value?.applicant[0] ?? ""; +}); onMounted(async () => { denom.value = await formatDenom(props.cardData?.pricePerCreditDenom); + cardDetailsList.value = getDetailsList( + props.cardData.creditCollection.creditData.nodes, + ); });