Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Commit

Permalink
add: external link of scan tag
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhe819 committed Sep 5, 2021
1 parent 48bd228 commit 62632d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
11 changes: 9 additions & 2 deletions src/components/NFT/NFTDetails.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
-5
<template>
<div class="details-container">
<h2>{{ details.name }} #{{ details.token_id }}</h2>
<ScanTag :chain="chain" />
<ScanTag
:chain="chain"
class="cursor-pointer"
@click="toExternalLink(details.asset_contract?.address, details.token_id)"
/>
<div>
<h3>Description</h3>
<p>{{ details.description }}</p>
Expand Down Expand Up @@ -40,6 +43,10 @@ import ScanTag from '@/components/NFT/ScanTag.vue';
export default class NFTDetail extends Vue {
details!: Object;
chain!: String;
public toExternalLink(address: string, tokenId: string) {
window.open(`https://opensea.io/assets/${address}/${tokenId}`);
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export default class Home extends Vue {
}
}
console.log(this.ethAddress);
// console.log(this.ethAddress);
const data = await RSS3.getAssetProfile(this.ethAddress);
if (!data) {
return;
Expand Down
1 change: 0 additions & 1 deletion src/views/NFTs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export default class NFTs extends Vue {
this.nftList = NFTList.filter((nft) => (!nft.tags || nft.tags.indexOf('pass:hidden') === -1) && nft.info).sort(
(a, b) => this.getNFTOrder(a) - this.getNFTOrder(b),
);
console.log(this.nftList);
}
private async getInfo(nft: RSS3Asset) {
Expand Down

0 comments on commit 62632d8

Please sign in to comment.