not able to redirect to index page '/' when form button clicked using app bridge redirect

Solved
ismailalabou
Excursionist
19 2 2

I followed this docs for the redirection process: redirect-to-a-relative-path-in-the-app, but still no luck so far.

 

 

 

 

 

 

 

import {Redirect} from '@shopify/app-bridge/actions';

onAction: () => {
                                          // console.log('clicked');
                                          const app = this.context;
                                          const redirect = Redirect.create(app);
                                          // Go to {appOrigin}/
                                          redirect.dispatch(Redirect.Action.APP, '/');
                                        } 

 

 

 

 

expected behavior is when I click on "remove discount", I got redirected to app index page '/'.

 

ismailalabou_0-1623705390765.png

 

0 Likes
ismailalabou
Excursionist
19 2 2

actual behavior:

ismailalabou_0-1623713605483.png

 

0 Likes