Open Alagaesia93 opened 6 months ago
And to add on top of this, I really don't understand why and how to fix this.
<Modal>
<TitleBar>
<button onClick={() => {open('/something', '_self')}}>Redirect</button>
</TitleBar
</Modal>
since it's not using react router navigation, it triggers a request to the server, but the request misses auth tokens, so it returns not authenticated.
I'm sure I'm doing something wrong, but I don't understand what
Is your app using server side rendering or client side?
try this:
<a href="shopify://admin/apps/your-store-handle/settings" target="_self"> ... </a>
try this:
<a href="shopify://admin/apps/your-store-handle/settings" target="_self"> ... </a>
If you're routing inside your app you don't need the full path, you can just do /settings Same with _self, you'll generally not need to set this.
Is the app using server side or client side for this?
try this:
<a href="shopify://admin/apps/your-store-handle/settings" target="_self"> ... </a>
If you're routing inside your app you don't need the full path, you can just do /settings Same with _self, you'll generally not need to set this.
Is the app using server side or client side for this?
My app is rendered from the client side. The path includes the shopify://admin
that prevents my app from reloading and keeps the NavMenu in sync with my app.
I'm having the same issue but with Polaris components that use links. Any polaris link results in a new tab opening, with the URL being my backend tunnel host instead of the proper https://admin.shopify.com/store/my-store/apps/my-app/...
link.
It seems to be related to the use of window.open
now instead of the old navigate()
method. Anyone else have a fix for this? It seems impossible to get around.
Same issue here. Shame, as the open() function is so clean. Want this to work.
@patrickbolle I think the fix is this: https://github.com/Shopify/shopify-frontend-template-react/issues/306
Describe the bug
Hello! I'm trying to migrate an embedded app (10 years old, some legacy here and there, but not much) with app bridge 3 to Polaris + app bridge 4 I'm finding really hard to work with internal navigation. In the documentation you suggest using
<a href="/settings">Settings</a>
, but in my dev environment it redirects to ngrok/settings, not to admin.shopify.com/apps/app/settings I tried to play with history and navigation, no success the only success I had is with useNavigate from react-router-dom.navigate('/settings')
works like a charmNot sure if it's my problem, documentation problem or app bridge problem, so here I am asking for help!
To Reproduce
I have not tried to reproduce on a new app. On my app, just add an internal link anywhere Please note that shopify://admin/products works perfectly
Packages and versions
Platform