🔧 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:
2023-03-01 23:40:18 -05:00
parent 2d61fa1436
commit 5b1ed2bdb8
3 changed files with 6 additions and 6 deletions

View File

@@ -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;

View File

@@ -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,

View File

@@ -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: () => {},