Skip to content

Commit

Permalink
🌐 Add locale to computed route
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong authored and nwingt committed Feb 20, 2023
1 parent 4d8a142 commit 9c445ae
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
9 changes: 6 additions & 3 deletions src/components/NFTPortfolio/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,18 @@ export default {
},
detailsPageRoute() {
if (this.nftIdForDetails) {
return {
return this.localeLocation({
name: 'nft-class-classId-nftId',
params: {
classId: this.classId,
nftId: this.nftIdForDetails,
},
};
});
}
return { name: 'nft-class-classId', params: { classId: this.classId } };
return this.localeLocation({
name: 'nft-class-classId',
params: { classId: this.classId },
});
},
},
methods: {
Expand Down
20 changes: 11 additions & 9 deletions src/mixins/nft.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,17 @@ export default {
: this.purchaseInfo?.nftId;
},
nftCollectRoute() {
return this.nftIsCollectable && this.nftIdCollectNext
? {
name: 'nft-class-classId-nftId',
params: { classId: this.classId, nftId: this.nftIdCollectNext },
}
: {
name: 'nft-class-classId',
params: { classId: this.classId },
};
return this.localeLocation(
this.nftIsCollectable && this.nftIdCollectNext
? {
name: 'nft-class-classId-nftId',
params: { classId: this.classId, nftId: this.nftIdCollectNext },
}
: {
name: 'nft-class-classId',
params: { classId: this.classId },
}
);
},
canCollectWithoutWallet() {
return (
Expand Down

0 comments on commit 9c445ae

Please sign in to comment.