App reviews, troubleshooting, and recommendations
I'm creating an embedded app. I have a list of products that are linked to my app.
In my app I want to be able to redirect the user to the edit page of the product when they click on it.
How can I do this?
Yes.
You can use Redirect action.
import {useNavigate} from '@shopify/app-bridge-react';
function MyComponent {
const navigate = useNavigate();
return (
<Link onClick={() => {
navigate({
name: 'Product',
resource: {
id: '123',
}
});
}}>Deluxe collection</Link>
);
}
Thanks for your reply.
Now I'm stuck adding app bridge to my embedded app.
The Provider needs an app bridge config object.
I'm having a hard time to fill in the host in this object.
In the documentation it states:
host: new URLSearchParams(location.search).get("host"),
But location or window.location is not defined in my embedded app.
Do you know another way to get the host? I searched and searched but I didn't found an answer 😞
Is this code helpful for you?
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On 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, 2023