-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hello,
I'm having a minor issue with useShopOrigin() after redirecting between my app routes using next JS router push, for ex: router.push("/new-page");
after looking into the source code and knowing that useShopOrigin use window.location.search means it depends on the shop param in the app URL after successful authentication.
I think this is fair assumption, I can simply maintain the shop and other params using next router push options as described here: https://nextjs.org/docs/api-reference/next/router
router.push({
pathname: '/post/[pid]',
query: { pid: post.id },
})
as an enhancement, it would be great if useShopOrigin to read the shop from the session token like how useApi works
Thank you
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels