import { isNil, map } from "lodash"; import React, { createRef, ReactElement, useCallback, useEffect } from "react"; import Card from "../Carda"; import Masonry from "react-masonry-css"; import { useDispatch, useSelector } from "react-redux"; import { getWeeklyPullList } from "../../actions/comicinfo.actions"; import { importToDB } from "../../actions/fileops.actions"; import ellipsize from "ellipsize"; import Slider from "react-slick"; import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick-theme.css"; import { Link } from "react-router-dom"; type PullListProps = { issues: any; }; export const PullList = ({ issues }: PullListProps): ReactElement => { const dispatch = useDispatch(); useEffect(() => { dispatch( getWeeklyPullList({ startDate: "2022-8-9", pageSize: "15", currentPage: "1", }), ); }, []); const addToLibrary = useCallback( (sourceName: string, locgMetadata) => dispatch(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); let sliderRef = createRef(); const settings = { dots: false, infinite: false, speed: 500, slidesToShow: 5, slidesToScroll: 5, initialSlide: 0, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 3, infinite: false, }, }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 2, initialSlide: 0, }, }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1, }, }, ], }; const next = () => { sliderRef.slickNext(); }; const previous = () => { sliderRef.slickPrev(); }; return ( <>
Pull List aggregated for the week from League Of Comic Geeks