summaryrefslogtreecommitdiffstats
path: root/src/utils/Routes.js
blob: a404dea238607a0447e2781ff70753e34269a892 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export function changeUrlAddress(pathObj, historyObj) {
  let toGo = '/' +
    pathObj.route +
    '/' +
    pathObj.hashId;
  historyObj.push(toGo, {lastRoute: pathObj.route});
}

export function buildRouteObj(routePath, routeHash) {
  return {
    route: routePath,
    hashId: routeHash
  };
}