@patternplate/client
Version:
Universal javascript client application for patternplate
27 lines (20 loc) • 610 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reduxActions = require("redux-actions");
const defaultValue = 0;
function onPreviewLocationChange(_, action) {
const index = Number(action.payload.query["search-preview"]);
return isNaN(index) ? 0 : Math.max(0, index);
}
function onPerformSeach() {
return 0;
}
var _default = (0, _reduxActions.handleActions)({
"@@router/LOCATION_CHANGE": onPreviewLocationChange,
PERFORM_SEARCH: onPerformSeach
}, defaultValue);
exports.default = _default;
//# sourceMappingURL=search-preview.js.map