Skip to content

Commit fa38ac1

Browse files
committed
Replace redux-first-history LOCATION_CHANGE with LOCATION_CHANGE dispatched from Home component when router location changes
1 parent eda14f2 commit fa38ac1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

handlereg.web.frontend/src/main/frontend/src/listeners.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { createListenerMiddleware } from '@reduxjs/toolkit';
22
import { isAnyOf } from '@reduxjs/toolkit';
33
import { api } from './api';
4-
import { LOCATION_CHANGE } from 'redux-first-history';
5-
import { VIS_KVITTERING, BUTIKKNAVN_ENDRE } from './actiontypes';
4+
import { VIS_KVITTERING, BUTIKKNAVN_ENDRE, LOCATION_CHANGE } from './actiontypes';
65

76
const listenerMiddleware = createListenerMiddleware();
87

@@ -52,7 +51,7 @@ listenerMiddleware.startListening({
5251
const basename = listenerApi.getState().basename;
5352
const newLocation = action.payload.location.pathname;
5453
if (basename + '/nybutikk' === newLocation) {
55-
listenerApi.dispatch(BUTIKKNAVN_ENDRE('')); // Blank receit display when navigating in the app
54+
listenerApi.dispatch(BUTIKKNAVN_ENDRE('')); // Blank store name form when navigating into new store component
5655
}
5756
}
5857
})

0 commit comments

Comments
 (0)