diff --git a/src/client/actions/fileops.actions.tsx b/src/client/actions/fileops.actions.tsx index bb54b2b..d2669a5 100644 --- a/src/client/actions/fileops.actions.tsx +++ b/src/client/actions/fileops.actions.tsx @@ -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": @@ -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; diff --git a/src/client/components/Downloads/Downloads.tsx b/src/client/components/Downloads/Downloads.tsx index 7481340..a18eafe 100644 --- a/src/client/components/Downloads/Downloads.tsx +++ b/src/client/components/Downloads/Downloads.tsx @@ -3,7 +3,6 @@ import { getTransfers } from "../../actions/airdcpp.actions"; import { useDispatch, useSelector } from "react-redux"; import { AirDCPPSocketContext } from "../../context/AirDCPPSocket"; import { isEmpty, isNil, isUndefined } from "lodash"; -import { searchIssue } from "../../actions/fileops.actions"; import { determineCoverFile } from "../../shared/utils/metadata.utils"; import MetadataPanel from "../shared/MetadataPanel"; @@ -47,7 +46,6 @@ export const Downloads = (props: IDownloadsProps): ReactElement => { }) setBundles(foo); } - }, [issueBundles]) return !isNil(bundles) ? @@ -56,9 +54,9 @@ export const Downloads = (props: IDownloadsProps): ReactElement => {

Downloads

- {bundles.map(bundle => { + {bundles.map((bundle, idx) => { console.log(bundle); - return <> + return
{ margin: "0 0 8px 0", }} /> - +
+ - - {bundle.acquisition.directconnect.downloads.map((bundle) => { - return( + + + {bundle.acquisition.directconnect.downloads.map((bundle, idx) => { + return () })} -
Name Size Type Bundle ID
{bundle.name} {bundle.size} {bundle.type.str} {bundle.bundleId}
+ + {/*
{JSON.stringify(bundle.acquisition.directconnect.downloads, null, 2)}
*/} - +
})}
- :
asd
; + :
There are no downloads.
; }; export default Downloads; diff --git a/src/client/components/GlobalSearchBar/SearchBar.tsx b/src/client/components/GlobalSearchBar/SearchBar.tsx index 3563359..bea5457 100644 --- a/src/client/components/GlobalSearchBar/SearchBar.tsx +++ b/src/client/components/GlobalSearchBar/SearchBar.tsx @@ -61,9 +61,10 @@ export const SearchBar = (data: ISearchBarProps): ReactElement => { margin: "60px 0 0 350px", }} > - {map(searchResults, (result) => ( + {map(searchResults, (result, idx) => ( { const searchResults = useSelector( (state: RootState) => state.fileOps.libraryComics, ); - const searchError = useSelector((state: RootState) => { - console.log(state); - return state.fileOps.librarySearchError; - }); + const searchError = useSelector((state: RootState) => state.fileOps.librarySearchError); const dispatch = useDispatch(); useEffect(() => { dispatch( @@ -221,9 +218,9 @@ export const Library = (): ReactElement => {
{
{}, previousPage: () => {}, diff --git a/src/client/components/WantedComics/WantedComics.tsx b/src/client/components/WantedComics/WantedComics.tsx index 56f0513..e4de3c4 100644 --- a/src/client/components/WantedComics/WantedComics.tsx +++ b/src/client/components/WantedComics/WantedComics.tsx @@ -73,8 +73,8 @@ export const WantedComics = (props): ReactElement => { id: "downloadDetails", accessorKey: "acquisition", cell: data =>
    - {data.getValue().directconnect.downloads.map(download => { - return
  1. {download.name}
  2. ; + {data.getValue().directconnect.downloads.map((download, idx) => { + return
  3. {download.name}
  4. ; })}
}, diff --git a/src/client/components/shared/T2Table.tsx b/src/client/components/shared/T2Table.tsx index d066bc5..95472dc 100644 --- a/src/client/components/shared/T2Table.tsx +++ b/src/client/components/shared/T2Table.tsx @@ -20,8 +20,6 @@ export const T2Table = (tableOptions): ReactElement => { pageIndex: 1, pageSize: 15, }); - console.log(sourceData) - const pagination = useMemo( () => ({ @@ -81,12 +79,12 @@ export const T2Table = (tableOptions): ReactElement => { {/*

{totalPages} comics in all

*/}
-

+

goToPreviousPage()}>
-

-

+

+
goToNextPage()}>
-

+

diff --git a/src/client/reducers/fileops.reducer.ts b/src/client/reducers/fileops.reducer.ts index 50f048f..210c85c 100644 --- a/src/client/reducers/fileops.reducer.ts +++ b/src/client/reducers/fileops.reducer.ts @@ -246,7 +246,7 @@ function fileOpsReducer(state = initialState, action) { case WANTED_COMICS_FETCHED: { const foo = []; if (!isUndefined(action.data.hits)) { - map(action.data.hits.hits, ({ _source }) => { + map(action.data.hits, ({ _source }) => { foo.push(_source); }); }