| 1 |
export const addTab = (tab) => { |
| 2 |
return { |
| 3 |
type: 'ADD_TAB', |
| 4 |
payload: { |
| 5 |
tab, |
| 6 |
}, |
| 7 |
}; |
| 8 |
}; |
| 9 |
|
| 10 |
export const setProfile = (profile) => { |
| 11 |
return { |
| 12 |
type: 'SET_PROFILE', |
| 13 |
payload: { |
| 14 |
profile, |
| 15 |
}, |
| 16 |
}; |
| 17 |
}; |
| 18 |
|
| 19 |
export const setApplicationError = (error) => { |
| 20 |
return { |
| 21 |
type: 'SET_APPLICATION_ERROR', |
| 22 |
payload: { |
| 23 |
error, |
| 24 |
}, |
| 25 |
}; |
| 26 |
}; |
| 27 |
|
| 28 |
export const setError = (error) => { |
| 29 |
console.log('set application error!!', error); |
| 30 |
return { |
| 31 |
type: 'SET_ERROR', |
| 32 |
payload: { |
| 33 |
error, |
| 34 |
}, |
| 35 |
}; |
| 36 |
}; |
| 37 |
|
| 38 |
export const setStates = (states) => { |
| 39 |
return { |
| 40 |
type: 'SET_STATES', |
| 41 |
payload: { |
| 42 |
states, |
| 43 |
}, |
| 44 |
}; |
| 45 |
}; |
| 46 |
|
| 47 |
export const setFetchingStates = (fetchingStates) => { |
| 48 |
return { |
| 49 |
type: 'SET_FETCHING_STATES', |
| 50 |
payload: { |
| 51 |
fetchingStates, |
| 52 |
}, |
| 53 |
}; |
| 54 |
}; |
| 55 |
|