Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
useEffect(() => {
if (match) {
const { dialogId, uri } = match;
const params = new URLSearchParams(location.search);
setDesignPageLocation({
dialogId: dialogId,
uri: uri,
focusedEvent: params.get('focusedEvent'),
focusedSteps: params.getAll('focusedSteps[]'),
breadcrumb: location.state ? location.state.breadcrumb || [] : [],
});
globalHistory._onTransitionComplete();
}
}, [location]);