Liquid, JavaScript, themes, sales channels
I have a problem with the app UI menu, when a sub menu is clicked the first click on the menu will receive the active status but subsequent clicks leave the status in the previous state. My app is using the remix template and I am using the standard setup from the template:
<AppProvider isEmbeddedApp apiKey={apiKey}>
<ui-nav-menu>
<Link to="/app" rel="home">
Home
</Link>
<Link to="/app/billing">billing</Link>
<Link to="/app/settings">settings</Link>
<Link to="/app/help">help</Link>
</ui-nav-menu>
<Outlet />
</AppProvider>
From the documentation:
https://shopify.dev/docs/api/app-bridge-library/reference/navigation-menu
The ui-nav-menu element is available for use in your app. It configures the sidebar navigation menu in the Shopify admin.
The first element is required and used to configure the home route of the app. It is not rendered as a link. It needs to have rel="home" set along with the href set to the root path.
While the example in the docs uses anchor tags in the documentation, the app template uses the Link component by default. I do have the rel="home" set on my root path, where am I going wrong here?
Solved! Go to the solution
This is an accepted solution.
So the documentation is correct. you must use an anchor tag for it to work. not sure why its included in the template.
This is an accepted solution.
So the documentation is correct. you must use an anchor tag for it to work. not sure why its included in the template.
Just for follow-up, there's an issue opened in the remix template:
https://github.com/Shopify/shopify-app-template-remix/issues/369
User | RANK |
---|---|
37 | |
28 | |
13 | |
13 | |
9 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023