Skip to content

Commit

Permalink
fix: Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Feb 16, 2024
1 parent 5956835 commit d2d05e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class CollectionItem extends React.PureComponent<Props> {
onSetItems([item])
onNavigate(locations.itemEditor({ itemId: item.id, collectionId: item.collectionId }), { fromParam: FromParam.COLLECTIONS })
this.analytics.track('Preview Item', {
ITEM_ID: item?.urn ? isThirdParty(item.urn) ? extractThirdPartyTokenId(item.urn) : extractTokenId(item.urn) : null,
ITEM_ID: item?.urn ? (isThirdParty(item.urn) ? extractThirdPartyTokenId(item.urn) : extractTokenId(item.urn)) : null,
ITEM_TYPE: item.type,
ITEM_NAME: item.name,
ITEM_IS_THIRD_PARTY: isThirdParty(item.urn)
Expand Down
4 changes: 3 additions & 1 deletion src/components/ItemEditorPage/CenterPanel/CenterPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export default class CenterPanel extends React.PureComponent<Props, State> {
EMOTE_PLAYED_BASE: !emote,
EMOTE_PLAYED_ITEM_ID: emote?.urn ? extractTokenId(emote.urn) : null,
EMOTE_PLAYED_NAME: emote ? emote.name : value,
PREVIEWED_WEARABLE_ITEM_ID: visibleItems.map(item => item?.urn ? isThirdParty(item.urn) ? extractThirdPartyTokenId(item.urn) : extractTokenId(item.urn) : null),
PREVIEWED_WEARABLE_ITEM_ID: visibleItems.map(item =>
item?.urn ? (isThirdParty(item.urn) ? extractThirdPartyTokenId(item.urn) : extractTokenId(item.urn)) : null
),
PREVIEWED_WEARABLE_NAME: visibleItems.map(item => item.name)
})

Expand Down
2 changes: 1 addition & 1 deletion src/components/ItemEditorPage/LeftPanel/Items/Items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default class Items extends React.PureComponent<Props, State> {
if (!this.isVisible(item)) {
newVisibleItemIds.push(item)
this.analytics.track('Preview Item', {
ITEM_ID: item?.urn ? isThirdParty(item.urn) ? extractThirdPartyTokenId(item.urn) : extractTokenId(item.urn) : null,
ITEM_ID: item?.urn ? (isThirdParty(item.urn) ? extractThirdPartyTokenId(item.urn) : extractTokenId(item.urn)) : null,
ITEM_TYPE: item.type,
ITEM_NAME: item.name,
ITEM_IS_THIRD_PARTY: isThirdParty(item.urn)
Expand Down
3 changes: 1 addition & 2 deletions src/lib/urn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ export function extractCollectionAddress(urn: URN): string {
const { collectionAddress } = decodedURN

return collectionAddress

}

export function extractTokenId(urn: URN): string {
Expand All @@ -178,4 +177,4 @@ export function extractTokenId(urn: URN): string {
}

return `${collectionAddress}:${tokenId ?? ''}`
}
}

0 comments on commit d2d05e9

Please sign in to comment.