users-actions

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.3 kB
1
Indexable
Never
import { Alert } from 'react-native';
import { addActivityTracker, getActivityMonitor, getDailyGoal, getUserProfile, postDailyGoal, removeProfilePicture, updateLocation, updateProfilePicture, updateUserProfile } from '../../api';
import { ShowErrorMessage } from '../../component/common/showErrorMessage';
import dispatchType from '../constants';

export const storeUserDetails = data => dispatch => {
  dispatch({
    type: dispatchType.storeUserDetails,
    payload: data,
  });
};

export const setPlanPurchsed = data => dispatch => {
  dispatch({
    type: dispatchType.planPurchased,
    payload: data,
  });
};

export const selectDate = data => dispatch => {
  dispatch({
    type: dispatchType.selectDate,
    payload: data,
  });
};

export const setLogOut = () => dispatch => {
  dispatch({
    type: dispatchType.logoutUser,
    payload: null,
  });
};

export const storeTrackerData = data => dispatch => {
  dispatch({
    type: dispatchType.storeTrackerData,
    payload: data,
  });
};

export const storeDailyGoalData = data => dispatch => {
  dispatch({
    type: dispatchType.storeDailyGoalData,
    payload: data,
  });
};

export const setGymPartner = data => dispatch => {
  dispatch({
    type: dispatchType.setGymPartner,
    payload: data,
  });
};
Leave a Comment