(fullName, nextPage)
| 100 | // Bails out if page is cached and user didn't specifically request next page. |
| 101 | // Relies on Redux Thunk middleware. |
| 102 | export const loadStargazers = (fullName, nextPage) => (dispatch, getState) => { |
| 103 | const { |
| 104 | nextPageUrl = `repos/${fullName}/stargazers`, |
| 105 | pageCount = 0 |
| 106 | } = getState().pagination.stargazersByRepo[fullName] || {} |
| 107 | |
| 108 | if (pageCount > 0 && !nextPage) { |
| 109 | return null |
| 110 | } |
| 111 | |
| 112 | return dispatch(fetchStargazers(fullName, nextPageUrl)) |
| 113 | } |
| 114 | |
| 115 | export const RESET_ERROR_MESSAGE = 'RESET_ERROR_MESSAGE' |
| 116 |
nothing calls this directly
no test coverage detected