Skip to content

Commit

Permalink
fix: collection listing display
Browse files Browse the repository at this point in the history
  • Loading branch information
MartianGreed committed Dec 5, 2024
1 parent 31f3c15 commit 0d89f39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/arkmarket/src/hooks/useSeasonPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ export const resources: Resources[] = [
export function useSeasonPass(token: Token | CollectionToken) {
const isSeasonPass = (collectionAddress: string) => collectionAddress === CollectionAddresses[Collections.ETERNUMSEASONPASS][ChainId.SN_MAIN];
const realmsResources: Resources[] = useMemo(() => {
if (null === token.metadata?.attributes) {
return []
}

return token.metadata?.attributes.map((a) => resources.find(r => r.trait === a.value)).filter(Boolean) as Resources[]
}, [token])

Expand Down

0 comments on commit 0d89f39

Please sign in to comment.