🔧 Fixed the response object in reducers and components https://github.com/rishighan/threetwo/issues/64
Signed-off-by: Rishi Ghan <rishi.ghan@gmail.com>
This commit is contained in:
@@ -314,13 +314,13 @@ export const searchIssue = (query, options) => async (dispatch) => {
|
||||
case "libraryPage":
|
||||
dispatch({
|
||||
type: SS_SEARCH_RESULTS_FETCHED,
|
||||
data: response.data.body,
|
||||
data: response.data.hits,
|
||||
});
|
||||
break;
|
||||
case "volumesPage":
|
||||
dispatch({
|
||||
type: VOLUMES_FETCHED,
|
||||
data: response.data.body,
|
||||
data: response.data.hits,
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
@@ -221,9 +221,9 @@ export const Library = (): ReactElement => {
|
||||
<div>
|
||||
<div className="library">
|
||||
<T2Table
|
||||
totalPages={searchResults.hits.total.value}
|
||||
totalPages={searchResults.total.value}
|
||||
columns={columns}
|
||||
sourceData={searchResults?.hits?.hits}
|
||||
sourceData={searchResults?.hits}
|
||||
rowClickHandler={navigateToComicDetail}
|
||||
paginationHandlers={{
|
||||
nextPage,
|
||||
|
||||
@@ -166,8 +166,8 @@ export const Volumes = (props): ReactElement => {
|
||||
<div>
|
||||
<div className="library">
|
||||
<T2Table
|
||||
sourceData={volumes?.hits?.hits}
|
||||
totalPages={volumes.hits.hits.length}
|
||||
sourceData={volumes?.hits}
|
||||
totalPages={volumes.hits.length}
|
||||
paginationHandlers={{
|
||||
nextPage: () => {},
|
||||
previousPage: () => {},
|
||||
|
||||
Reference in New Issue
Block a user