Sha256: e08e7cc49103df8d75940ad0049d85ec78e8876007edaa241623211d037b6422
Contents?: true
Size: 604 Bytes
Versions: 5
Compression:
Stored size: 604 Bytes
Contents
import { endsWith, get } from 'lodash'; import appConfig from 'redux/nodes/app/config'; const { LOGIN_SUCCESS, LOGOUT_SUCCESS } = appConfig.actionTypes; const UNAUTHORIZED_ERROR = 401; const isFailureAction = (action) => { return endsWith(action.type, '_FAILURE'); }; const isLoginAction = action => action.type === LOGIN_SUCCESS; const isLogoutAction = action => action.type === LOGOUT_SUCCESS; const isUnauthorizedError = action => get(action, 'payload.errors.http_status') === UNAUTHORIZED_ERROR; export default { isFailureAction, isLoginAction, isLogoutAction, isUnauthorizedError, };
Version data entries
5 entries across 5 versions & 1 rubygems