UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

15 lines 823 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const reselect_1 = require("reselect"); exports.getPathname = (state) => state.router.location.pathname; exports.getPaths = reselect_1.createSelector(exports.getPathname, (pathname) => pathname.split('/').filter(i => i)); exports.getAllocationPage = reselect_1.createSelector(exports.getPaths, (paths) => paths[paths.length - 1]); exports.getPageFromAction = (action) => { const { pathname } = action.payload; // console.log('SELECTING PATH FROM ACTION', pathname) return pathname ? pathname.replace('/', '') : ''; }; exports.isManualAllocationRoute = reselect_1.createSelector(exports.getPaths, (paths) => paths[0] === 'allocation' && paths[1] === 'progress' || paths[1] === 'completed'); //# sourceMappingURL=location.js.map