Skip to content

Commit

Permalink
Merge pull request #10292 from Jarsen136/issue-10291
Browse files Browse the repository at this point in the history
fix: Well formated descriptions is not visible
  • Loading branch information
Jarsen136 authored May 17, 2024
2 parents efaac8a + dbbefa2 commit 90848dc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion components/collection/utils/useCollectionDetails.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getVolume } from '@/utils/math'
import { NFT } from '@/components/rmrk/service/scheme'
import { NFT, NFTMetadata } from '@/components/rmrk/service/scheme'
import { NFTListSold } from '@/components/identity/utils/useIdentity'
import { Stats } from './types'
import { processSingleMetadata } from '@/utils/cachingStrategy'
import collectionBuyEventStatsById from '@/queries/subsquid/general/collectionBuyEventStatsById.query'

export const useCollectionDetails = ({
Expand Down Expand Up @@ -126,5 +127,15 @@ export const useCollectionMinimal = ({

watch(variables, () => refetch(variables.value))

watchEffect(async () => {
const metadata = collection.value?.metadata
if (metadata && !collection.value?.meta) {
const meta = (await processSingleMetadata(metadata)) as NFTMetadata
if (meta) {
collection.value.meta = meta
}
}
})

return { collection }
}

0 comments on commit 90848dc

Please sign in to comment.