🔧 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":
|
||||
dispatch({
|
||||
type: WANTED_COMICS_FETCHED,
|
||||
data: response.data.body,
|
||||
data: response.data.hits,
|
||||
});
|
||||
break;
|
||||
case "globalSearchBar":
|
||||
|
||||
@@ -73,8 +73,8 @@ export const WantedComics = (props): ReactElement => {
|
||||
id: "downloadDetails",
|
||||
accessorKey: "acquisition",
|
||||
cell: data => <ol>
|
||||
{data.getValue().directconnect.downloads.map(download => {
|
||||
return <li className="is-size-7">{download.name}</li>;
|
||||
{data.getValue().directconnect.downloads.map((download, idx) => {
|
||||
return <li className="is-size-7" key={idx}>{download.name}</li>;
|
||||
})}
|
||||
</ol>
|
||||
},
|
||||
|
||||
@@ -244,9 +244,10 @@ function fileOpsReducer(state = initialState, action) {
|
||||
};
|
||||
}
|
||||
case WANTED_COMICS_FETCHED: {
|
||||
console.log(action);
|
||||
const foo = [];
|
||||
if (!isUndefined(action.data.hits)) {
|
||||
map(action.data.hits.hits, ({ _source }) => {
|
||||
map(action.data.hits, ({ _source }) => {
|
||||
foo.push(_source);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user