// helper
const formatUsersLocations = (users) => {
  const formatedUsers = users.map((user) => {
    const latitude = parseFloat(user[1][0]);
    const longitude = parseFloat(user[1][1]);
    const userId = user[0];

    const formatedUser = {
      latitude,
      longitude,
      userId,
    };
    return formatedUser;
  });
  return formatedUsers;
};

export default { formatUsersLocations };
