Closed mxp-qk closed 1 year ago
Hi @mxp-qk!
Are you able to upgrade to the latest versions and try again? That's version 3.3.2
. I'm not currently able to reproduce the issue (I can navigate to an individual order page okay).
Hi @charlesdobson,
I bootstrap the project with npm init @shopify/app@latest
two days ago so I didn't check the latest version, my bad.
It didn't solve the issue but this did :
<Link
onClick={() =>
navigate({ name: "Order", resource: { id: id.toString() } })
}
>
Order Number
</Link>
In my example and working test the id was a primitive string but in my real use cas the id come from the API and was a number.
Ah, good to know! Maybe it would be better if we were to accept numbers and convert them to a string on our end. I will take a look into it. Glad you got it working for now though!
Describe the bug
The useNavigate hook should allow to
The given exemple works well for a given collection but when trying to navigate to a given order the hook won't work
[Doc](Navigate to Shopify admin by using a section name and an optional resource ID.)
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
The link should navigate to the order page
Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge
@3.1.0
@shopify/app-bridge-react
@3.1.0
@shopify/polaris
@9.11.0
Platform