Skip to content

Commit

Permalink
Handle new shape of participation API endpoint (#469)
Browse files Browse the repository at this point in the history
* Clear localStorage everytime for now

* Handle paginated results from participation API
  • Loading branch information
jeremiak authored and brendansudol committed Mar 1, 2017
1 parent a30fe78 commit 0982245
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const render = () => {
)
}

// window.localStorage.clear()
window.localStorage.clear()

render()
store.subscribe(render)
4 changes: 2 additions & 2 deletions src/util/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ const getSummaryRequests = params => {

const getUcrParticipation = place => {
const state = lookupUsa(place).toUpperCase()
return get(`${API}/geo/states/${state}/participation`).then(results => ({
return get(`${API}/geo/states/${state}/participation`).then(response => ({
place: slugify(place),
results,
results: response.results,
}))
}

Expand Down

0 comments on commit 0982245

Please sign in to comment.