| 123456789101112131415161718192021222324252627282930313233 |
- import createReducer from "../../utils/createReducer";
-
- import {
- AUTH_PROVIDER_ERROR,
- AUTH_PROVIDER_SUCCESS,
- } from "../../actions/authProvider/authProviderActionConstants";
-
- const initialState = {
- success: "",
- errorMessage: "",
- };
-
- export default createReducer(
- {
- [AUTH_PROVIDER_SUCCESS]: setProvider,
- [AUTH_PROVIDER_ERROR]: setProviderError,
- },
- initialState
- );
-
- function setProvider(state, action) {
- return {
- ...state,
- success: action.payload,
- };
- }
-
- function setProviderError(state, action) {
- return {
- ...state,
- errorMessage: action.payload,
- };
- }
|