import {NAVIGATE} from './actions'
import {loadRegionByCode} from './region'

/* Action creators */
export function navigate(match = {}) {
  return dispatch => {
    const {params} = match
    if (params.region) {
      dispatch(loadRegionByCode(params.region))
    }
    dispatch({
      type: NAVIGATE,
      match
    })
  }
}

@@ -207,16 +207,68 @@
 gion) %7B%0A
+      const %5BregionCode%5D = params.region.split('-')%0A
       di
@@ -291,29 +291,26 @@
 nByCode(
-params.
 region
+Code
 ))%0A    %7D

Allow region name in region part of url