appbaseio/dejaVu

View on GitHub
packages/browser/src/reducers/applyQuery.js

Summary

Maintainability
A
1 hr
Test Coverage
import { APPLY_QUERY } from '../actions/constants';

const applyQueryReducer = (state = false, action) => {
    const { applyQuery } = action;
    switch (action.type) {
        case APPLY_QUERY.SET_APPLY_QUERY:
            return applyQuery;
        default:
            return state;
    }
};

const getApplyQuery = state => state.applyQuery;

export { getApplyQuery };

export default applyQueryReducer;