diff --git a/src/client/components/Dashboard/Dashboard.tsx b/src/client/components/Dashboard/Dashboard.tsx index cd70686..0aeac8a 100644 --- a/src/client/components/Dashboard/Dashboard.tsx +++ b/src/client/components/Dashboard/Dashboard.tsx @@ -1,29 +1,19 @@ -import React, { ReactElement, useEffect } from "react"; -import { useDispatch, useSelector } from "react-redux"; +import React, { ReactElement } from "react"; import ZeroState from "./ZeroState"; import { RecentlyImported } from "./RecentlyImported"; import { WantedComicsList } from "./WantedComicsList"; import { VolumeGroups } from "./VolumeGroups"; import { LibraryStatistics } from "./LibraryStatistics"; import { PullList } from "./PullList"; -import { - fetchVolumeGroups, - getComicBooks, -} from "../../actions/fileops.actions"; import { getLibraryStatistics } from "../../actions/comicinfo.actions"; import { isEmpty, isNil, isUndefined } from "lodash"; import Header from "../shared/Header"; import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; import axios from "axios"; -import { Card } from "../shared/Carda"; import { LIBRARY_SERVICE_BASE_URI, LIBRARY_SERVICE_HOST, } from "../../constants/endpoints"; -import { - determineCoverFile, - determineExternalMetadata, -} from "../../shared/utils/metadata.utils"; export const Dashboard = (): ReactElement => { const { data: recentComics } = useQuery({ @@ -69,43 +59,6 @@ export const Dashboard = (): ReactElement => { queryKey: ["volumeGroups"], }); - console.log("hari om", volumeGroups); - // useEffect(() => { - // dispatch(fetchVolumeGroups()); - // dispatch( - // getComicBooks({ - // paginationOptions: { - // page: 0, - // limit: 5, - // sort: { updatedAt: "-1" }, - // }, - // predicate: { "acquisition.source.wanted": false }, - // comicStatus: "recent", - // }), - // ); - // dispatch( - // getComicBooks({ - // paginationOptions: { - // page: 0, - // limit: 5, - // sort: { updatedAt: "-1" }, - // }, - // predicate: { "acquisition.source.wanted": true }, - // comicStatus: "wanted", - // }), - // ); - // dispatch(getLibraryStatistics()); - // }, []); - // - // const recentComics = useSelector( - // (state: RootState) => state.fileOps.recentComics, - // ); - // const wantedComics = useSelector( - // (state: RootState) => state.fileOps.wantedComics, - // ); - // const volumeGroups = useSelector( - // (state: RootState) => state.fileOps.comicVolumeGroups, - // ); // // const libraryStatistics = useSelector( // (state: RootState) => state.comicInfo.libraryStatistics, diff --git a/src/client/components/Dashboard/PullList.tsx b/src/client/components/Dashboard/PullList.tsx index c43d6ac..7275add 100644 --- a/src/client/components/Dashboard/PullList.tsx +++ b/src/client/components/Dashboard/PullList.tsx @@ -1,5 +1,5 @@ -import { isNil, map } from "lodash"; -import React, { createRef, ReactElement, useCallback, useEffect } from "react"; +import React, { ReactElement } from "react"; +import { map } from "lodash"; import Card from "../shared/Carda"; import Header from "../shared/Header"; import { importToDB } from "../../actions/fileops.actions"; @@ -24,7 +24,7 @@ const http = rateLimiter(axios.create(), { }); const cachedAxios = setupCache(axios); export const PullList = (): ReactElement => { - // blaze slider + // keen slider const [sliderRef, instanceRef] = useKeenSlider( { loop: true, @@ -34,7 +34,6 @@ export const PullList = (): ReactElement => { perView: 5, spacing: 15, }, - slideChanged() { console.log("slide changed"); }, @@ -52,7 +51,7 @@ export const PullList = (): ReactElement => { queryFn: async () => await cachedAxios(`${COMICVINE_SERVICE_URI}/getWeeklyPullList`, { method: "get", - params: { startDate: "2023-9-9", pageSize: "15", currentPage: "1" }, + params: { startDate: "2024-2-15", pageSize: "15", currentPage: "1" }, }), queryKey: ["pullList"], }); @@ -60,20 +59,6 @@ export const PullList = (): ReactElement => { const addToLibrary = (sourceName: string, locgMetadata) => importToDB(sourceName, { locg: locgMetadata }); - /* - const foo = { - coverFile: {}, // pointer to which cover file to use - rawFileDetails: {}, // #1 - sourcedMetadata: { - comicInfo: {}, - comicvine: {}, // #2 - locg: {}, // #2 - }, - }; - */ - - // const pullList = useSelector((state: RootState) => state.comicInfo.pullList); - const next = () => { // sliderRef.slickNext(); }; @@ -116,10 +101,10 @@ export const PullList = (): ReactElement => { orientation={"vertical-2"} imageUrl={issue.cover} hasDetails - title={ellipsize(issue.name, 18)} + title={ellipsize(issue.name, 25)} > -