| 1 |
import { Redirect } from '@reach/router'; |
| 2 |
import actionsMap from 'elementor-app/url-actions/actions-map'; |
| 3 |
|
| 4 |
export default function Index() { |
| 5 |
const urlSearchParams = new URLSearchParams( window.location.search ), |
| 6 |
queryParams = Object.fromEntries( urlSearchParams.entries() ), |
| 7 |
// The 'action' query param is translated into a route URL. |
| 8 |
url = actionsMap[ queryParams.action ] || elementorAppConfig.menu_url.split( '#' )?.[ 1 ]; |
| 9 |
|
| 10 |
return ( |
| 11 |
<Redirect to={ url || '/not-found' } noThrow={ true } /> |
| 12 |
); |
| 13 |
} |
| 14 |
|