You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
I replaced AccordianBody with the main with regular 'body' type. This allows all the modules from the main body, such as images, and products. All the modules work fine with one notable exception, Products. When I try to use the Product module inside of an Accordion, it does not work.
The first issue I found is the module object is different for a product when inside of an Accordion.
Instead of a 'gid' object, it only has a '_ref' object, and several other differences. I struggled to figure this out, so I extracted the ID's from '_ref' and passed those to getGid() instead.
However, when I pass a gid into getGid() I get no response.
I'm still fairly new to react and brand new to hydrogen/sanity, I have a feeling there is some type of context/cache I am missing but can't pinpoint it. Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Losing my sanity with this bug.
I replaced AccordianBody with the main with regular 'body' type. This allows all the modules from the main body, such as images, and products. All the modules work fine with one notable exception, Products. When I try to use the Product module inside of an Accordion, it does not work.
The first issue I found is the module object is different for a product when inside of an Accordion.
Outside Accordion Block:
{"_key":"308e2cca183a","productWithVariant":{"variantGid":"gid://shopify/ProductVariant/39260714565823","_id":"shopifyProduct-6539667636415","_type":"productWithVariant","available":true,"gid":"gid://shopify/Product/6539667636415","slug":"installation-kit"}}
Inside Accordion Block:
{"_type":"module.product","_key":"11cfb4be7340","productWithVariant":{"product":{"_weak":true,"_ref":"shopifyProduct-6539667636415","_type":"reference"},"_type":"productWithVariant","variant":{"_type":"reference","_weak":true,"_ref":"shopifyProductVariant-39260714565823"}}}
Instead of a 'gid' object, it only has a '_ref' object, and several other differences. I struggled to figure this out, so I extracted the ID's from '_ref' and passed those to getGid() instead.
However, when I pass a gid into getGid() I get no response.
I'm still fairly new to react and brand new to hydrogen/sanity, I have a feeling there is some type of context/cache I am missing but can't pinpoint it. Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: