diff options
Diffstat (limited to 'src/utils/Routes.js')
-rw-r--r-- | src/utils/Routes.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/utils/Routes.js b/src/utils/Routes.js new file mode 100644 index 0000000..a404dea --- /dev/null +++ b/src/utils/Routes.js @@ -0,0 +1,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 + }; +} |