Commiting

This commit is contained in:
mgabdev
2020-11-15 12:48:32 -06:00
parent 62515bbaee
commit fb612f60c8
1011 changed files with 3507 additions and 49604 deletions

View File

@@ -5,18 +5,19 @@ export const PROMOTIONS_FETCH_REQUEST = 'PROMOTIONS_FETCH_REQUEST'
export const PROMOTIONS_FETCH_SUCCESS = 'PROMOTIONS_FETCH_SUCCESS'
export const PROMOTIONS_FETCH_FAIL = 'PROMOTIONS_FETCH_FAIL'
export const fetchPromotions = () => {
return (dispatch, getState) => {
if (!me) return
/**
*
*/
export const fetchPromotions = () => (dispatch, getState) => {
if (!me) return
dispatch(fetchPromotionsRequest())
dispatch(fetchPromotionsRequest())
api(getState).get('/api/v1/promotions').then((response) => {
dispatch(fetchPromotionsSuccess(response.data))
}).catch((error) => {
dispatch(fetchPromotionsFail(error))
})
}
api(getState).get('/api/v1/promotions').then((response) => {
dispatch(fetchPromotionsSuccess(response.data))
}).catch((error) => {
dispatch(fetchPromotionsFail(error))
})
}
const fetchPromotionsRequest = () => ({