diff --git a/src/client/components/Library/Library.tsx b/src/client/components/Library/Library.tsx
index 19f3084..7b05acd 100644
--- a/src/client/components/Library/Library.tsx
+++ b/src/client/components/Library/Library.tsx
@@ -4,9 +4,10 @@ import { useNavigate } from "react-router-dom";
import { isEmpty, isNil, isUndefined } from "lodash";
import MetadataPanel from "../shared/MetadataPanel";
import T2Table from "../shared/T2Table";
-import { useDispatch, useSelector } from "react-redux";
import { searchIssue } from "../../actions/fileops.actions";
import ellipsize from "ellipsize";
+import { useQuery } from "@tanstack/react-query";
+import axios from "axios";
/**
* Component that tabulates the contents of the user's ThreeTwo Library.
@@ -16,29 +17,31 @@ import ellipsize from "ellipsize";
*
- {!isUndefined(searchError.data) &&
+ {!isUndefined(searchResults?.code === 404 && !isLoading) &&
JSON.stringify(
- searchError.data.meta.body.error.root_cause,
+ searchResults.data.meta.body.error.root_cause,
null,
4,
)}
diff --git a/src/client/components/Library/SearchBar.tsx b/src/client/components/Library/SearchBar.tsx
index 089704c..2e3d774 100644
--- a/src/client/components/Library/SearchBar.tsx
+++ b/src/client/components/Library/SearchBar.tsx
@@ -2,29 +2,27 @@ import React, { ReactElement, useCallback } from "react";
import PropTypes from "prop-types";
import { Form, Field } from "react-final-form";
import { Link } from "react-router-dom";
-import { useDispatch } from "react-redux";
import { searchIssue } from "../../actions/fileops.actions";
export const SearchBar = (): ReactElement => {
- const dispatch = useDispatch();
const handleSubmit = useCallback((e) => {
- dispatch(
- searchIssue(
- {
- query: {
- volumeName: e.search,
- },
- },
- {
- pagination: {
- size: 25,
- from: 0,
- },
- type: "volumeName",
- trigger: "libraryPage",
- },
- ),
- );
+ // dispatch(
+ // searchIssue(
+ // {
+ // query: {
+ // volumeName: e.search,
+ // },
+ // },
+ // {
+ // pagination: {
+ // size: 25,
+ // from: 0,
+ // },
+ // type: "volumeName",
+ // trigger: "libraryPage",
+ // },
+ // ),
+ // );
}, []);
return (
@@ -56,7 +54,6 @@ export const SearchBar = (): ReactElement => {
)}
/>
-
);
};
diff --git a/src/client/components/PullList/PullList.tsx b/src/client/components/PullList/PullList.tsx
index b264248..8b2cc83 100644
--- a/src/client/components/PullList/PullList.tsx
+++ b/src/client/components/PullList/PullList.tsx
@@ -1,25 +1,23 @@
import React, { ReactElement, useEffect, useMemo } from "react";
import T2Table from "../shared/T2Table";
import { getWeeklyPullList } from "../../actions/comicinfo.actions";
-import { useDispatch, useSelector } from "react-redux";
import Card from "../shared/Carda";
import ellipsize from "ellipsize";
import { isNil } from "lodash";
export const PullList = (): ReactElement => {
- const pullListComics = useSelector(
- (state: RootState) => state.comicInfo.pullList,
- );
+ // const pullListComics = useSelector(
+ // (state: RootState) => state.comicInfo.pullList,
+ // );
- const dispatch = useDispatch();
useEffect(() => {
- dispatch(
- getWeeklyPullList({
- startDate: "2023-7-28",
- pageSize: "15",
- currentPage: "1",
- }),
- );
+ // dispatch(
+ // getWeeklyPullList({
+ // startDate: "2023-7-28",
+ // pageSize: "15",
+ // currentPage: "1",
+ // }),
+ // );
}, []);
const nextPageHandler = () => {};
const previousPageHandler = () => {};
diff --git a/src/client/components/Volumes/Volumes.tsx b/src/client/components/Volumes/Volumes.tsx
index f4d9f1e..897209b 100644
--- a/src/client/components/Volumes/Volumes.tsx
+++ b/src/client/components/Volumes/Volumes.tsx
@@ -1,5 +1,4 @@
import React, { ReactElement, useEffect, useMemo } from "react";
-import { useDispatch, useSelector } from "react-redux";
import { searchIssue } from "../../actions/fileops.actions";
import Card from "../shared/Carda";
import T2Table from "../shared/T2Table";
@@ -8,24 +7,23 @@ import { convert } from "html-to-text";
import { isUndefined } from "lodash";
export const Volumes = (props): ReactElement => {
- const volumes = useSelector((state: RootState) => state.fileOps.volumes);
- const dispatch = useDispatch();
+ // const volumes = useSelector((state: RootState) => state.fileOps.volumes);
useEffect(() => {
- dispatch(
- searchIssue(
- {
- query: {},
- },
- {
- pagination: {
- size: 25,
- from: 0,
- },
- type: "volumes",
- trigger: "volumesPage",
- },
- ),
- );
+ // dispatch(
+ // searchIssue(
+ // {
+ // query: {},
+ // },
+ // {
+ // pagination: {
+ // size: 25,
+ // from: 0,
+ // },
+ // type: "volumes",
+ // trigger: "volumesPage",
+ // },
+ // ),
+ // );
}, []);
const columnData = useMemo(
() => [
diff --git a/src/client/components/WantedComics/WantedComics.tsx b/src/client/components/WantedComics/WantedComics.tsx
index e4de3c4..9125368 100644
--- a/src/client/components/WantedComics/WantedComics.tsx
+++ b/src/client/components/WantedComics/WantedComics.tsx
@@ -1,5 +1,4 @@
import React, { ReactElement, useCallback, useEffect, useMemo } from "react";
-import { useDispatch, useSelector } from "react-redux";
import { searchIssue } from "../../actions/fileops.actions";
import SearchBar from "../Library/SearchBar";
import T2Table from "../shared/T2Table";
@@ -7,26 +6,25 @@ import { isEmpty, isUndefined } from "lodash";
import MetadataPanel from "../shared/MetadataPanel";
export const WantedComics = (props): ReactElement => {
- const wantedComics = useSelector(
- (state: RootState) => state.fileOps.wantedComics,
- );
- const dispatch = useDispatch();
+ // const wantedComics = useSelector(
+ // (state: RootState) => state.fileOps.wantedComics,
+ // );
useEffect(() => {
- dispatch(
- searchIssue(
- {
- query: {},
- },
- {
- pagination: {
- size: 25,
- from: 0,
- },
- type: "wanted",
- trigger: "wantedComicsPage"
- },
- ),
- );
+ // dispatch(
+ // searchIssue(
+ // {
+ // query: {},
+ // },
+ // {
+ // pagination: {
+ // size: 25,
+ // from: 0,
+ // },
+ // type: "wanted",
+ // trigger: "wantedComicsPage"
+ // },
+ // ),
+ // );
}, []);
const columnData = [
@@ -37,7 +35,7 @@ export const WantedComics = (props): ReactElement => {
header: "Details",
id: "comicDetails",
minWidth: 350,
- accessorFn: data => data,
+ accessorFn: (data) => data,
cell: (value) => ,
},
],
@@ -49,8 +47,10 @@ export const WantedComics = (props): ReactElement => {
header: "Files",
accessorKey: "acquisition",
align: "right",
- cell: props => {
- const { directconnect: { downloads } } = props.getValue();
+ cell: (props) => {
+ const {
+ directconnect: { downloads },
+ } = props.getValue();
return (
{
}}
>
{downloads.length > 0 ? (
-
- {downloads.length}
-
+ {downloads.length}
) : null}
);
@@ -72,11 +70,17 @@ export const WantedComics = (props): ReactElement => {
header: "Download Details",
id: "downloadDetails",
accessorKey: "acquisition",
- cell: data =>
- {data.getValue().directconnect.downloads.map((download, idx) => {
- return - {download.name}
;
- })}
-
+ cell: (data) => (
+
+ {data.getValue().directconnect.downloads.map((download, idx) => {
+ return (
+ -
+ {download.name}
+
+ );
+ })}
+
+ ),
},
{
header: "Type",
@@ -92,7 +96,7 @@ export const WantedComics = (props): ReactElement => {
* @param {number} pageIndex
* @param {number} pageSize
* @returns void
- *
+ *
**/
const nextPage = useCallback((pageIndex: number, pageSize: number) => {
dispatch(
@@ -112,7 +116,6 @@ export const WantedComics = (props): ReactElement => {
);
}, []);
-
/**
* Pagination control that fetches the previous x (pageSize) items
* based on the y (pageIndex) offset from the Elasticsearch index
@@ -138,7 +141,7 @@ export const WantedComics = (props): ReactElement => {
from,
},
type: "wanted",
- trigger: "wantedComicsPage"
+ trigger: "wantedComicsPage",
},
),
);
@@ -161,7 +164,7 @@ export const WantedComics = (props): ReactElement => {
nextPage: nextPage,
previousPage: previousPage,
}}
- // rowClickHandler={navigateToComicDetail}
+ // rowClickHandler={navigateToComicDetail}
/>
{/* pagination controls */}