🔧 Fixed the response in wanted reducer action
Signed-off-by: Rishi Ghan <rishi.ghan@gmail.com>
This commit is contained in:
@@ -301,7 +301,7 @@ export const searchIssue = (query, options) => async (dispatch) => {
|
|||||||
case "wantedComicsPage":
|
case "wantedComicsPage":
|
||||||
dispatch({
|
dispatch({
|
||||||
type: WANTED_COMICS_FETCHED,
|
type: WANTED_COMICS_FETCHED,
|
||||||
data: response.data.body,
|
data: response.data.hits,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "globalSearchBar":
|
case "globalSearchBar":
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ export const WantedComics = (props): ReactElement => {
|
|||||||
id: "downloadDetails",
|
id: "downloadDetails",
|
||||||
accessorKey: "acquisition",
|
accessorKey: "acquisition",
|
||||||
cell: data => <ol>
|
cell: data => <ol>
|
||||||
{data.getValue().directconnect.downloads.map(download => {
|
{data.getValue().directconnect.downloads.map((download, idx) => {
|
||||||
return <li className="is-size-7">{download.name}</li>;
|
return <li className="is-size-7" key={idx}>{download.name}</li>;
|
||||||
})}
|
})}
|
||||||
</ol>
|
</ol>
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -244,9 +244,10 @@ function fileOpsReducer(state = initialState, action) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
case WANTED_COMICS_FETCHED: {
|
case WANTED_COMICS_FETCHED: {
|
||||||
|
console.log(action);
|
||||||
const foo = [];
|
const foo = [];
|
||||||
if (!isUndefined(action.data.hits)) {
|
if (!isUndefined(action.data.hits)) {
|
||||||
map(action.data.hits.hits, ({ _source }) => {
|
map(action.data.hits, ({ _source }) => {
|
||||||
foo.push(_source);
|
foo.push(_source);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user