-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: display Parent NFT data on the Parent page #10
Conversation
Visit the preview URL for this PR (updated for commit fc2e9cf): https://ink-nft-246a8--pr10-feat-parent-page-1oitj8xi.web.app (expires Mon, 13 Mar 2023 11:19:26 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 5ac08693a193400324311225543cd42232d18254 |
@bobo-k2 |
src/components/parent/Inventory.vue
Outdated
@@ -75,13 +108,27 @@ export default defineComponent({ | |||
|
|||
const dummyEquippedList = [dummyItemB, dummyItemA]; | |||
|
|||
const equipped = computed<IBasePart[]>(() => props.parts.filter((it) => isSlotEquipped(it))); | |||
|
|||
const navigateToChild = (id: string): void => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bobo-k2
For the equipped items, I assume tokenId
for the "/child page" can be found in z
. Please let me know if this is not correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @impelcrypto this is not correct. Z variable determines in which layer asset should be rendered. Something like z-index in css.
To get token id you should use equippable::get_equipment
. The method, beside others, returns equipped item contract address and token id.
Maybe to make naming more generic. Instead of |
Sorry, could you send me an example code for this? |
Fixed in this commit.
We still need this value for now for this line. Let's take a look again once this issue has been resolved. |
http://localhost:8080/#/shibuya-testnet/parent?tokenId=1