summaryrefslogtreecommitdiff
path: root/frontend/src/redux/app.js
blob: 172dc960e652da4d2241b2cd52c1cae6e08a7915 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export const makeSelectLocationState = () => {
  let prevRoutingState;
  let prevRoutingStateJS;

  return (state) => {
    const routingState = state.get('routing')

    if (!routingState.equals(prevRoutingState)) {
      prevRoutingState = routingState
      prevRoutingStateJS = routingState.toJS()
    }

    return prevRoutingStateJS;
  }
}
bgstack15