App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
My js breadcrumb links always open in a new tab. How can I force them to open in the same tab?
My code looks like this:
import createApp from "@shopify/app-bridge"; import { Redirect } from "@shopify/app-bridge/actions"; const host = Buffer.from(`${shop}/admin`).toString("base64"); const app = createApp({ apiKey: fConstants.SHOPIFY_API_KEY, host: host, }); const redirect = Redirect.create(app); const url1 = Redirect.Action.ADMIN_PATH; const url2 = "/products/"; redirect.dispatch( url1, url2 );
I tried these two code changes, but to no avail
const app = createApp({
apiKey: fConstants.SHOPIFY_API_KEY,
host: host,
forceRedirect: true
});
redirect.dispatch( url1, {
path: "/products",
newContext: false,
});
Thanks! jb
Solved! Go to the solution
This is an accepted solution.
I think I got it!
const url2 = "/../../products/";
<Page
title={`Page title`}
backAction={{
content: `Return to products list`,
url: "/../../products/",
}}
>
This is an accepted solution.
I think I got it!
const url2 = "/../../products/";
<Page
title={`Page title`}
backAction={{
content: `Return to products list`,
url: "/../../products/",
}}
>