text: import axios from 'axios';
  import { actionTypes } from './actionTypes';
  
  export const getData = () => {
    return async (dispatch) => {
      try {
        const response = await axios.get('http://localhost:3001/admin');
        
        dispatch({
          type: actionTypes.GET_ADMIN_DATA,
          payload: response.data,
        });
  
      } catch (err) {
        console.log(err);
      }
    }
  }