export const vote = (pollId, choices) => (dispatch, getState) => {
  dispatch(voteRequest());

  api(getState).post(`/api/v1/polls/${pollId}/votes`, { choices })
    .then(({ data }) => {