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 "../Carda"; import ellipsize from "ellipsize"; export const PullList = (): ReactElement => { const pullListComics = useSelector( (state: RootState) => state.comicInfo.pullList, ); console.log(pullListComics); const dispatch = useDispatch(); useEffect(() => { dispatch( getWeeklyPullList({ startDate: "2022-6-1", pageSize: "100", currentPage: "1", }), ); }, []); const nextPageHandler = () => {}; const previousPageHandler = () => {}; const columnData = useMemo( () => [ { Header: "Comic Information", columns: [ { Header: "Details", id: "comicDetails", minWidth: 450, accessor: (row) => { console.log(row); return (
{row.name}
published by{" "} {row.publisher}
{ellipsize(row.description, 190)}
{row.price} {row.pulls}
); }, }, ], }, ], [], ); return (

Weekly Pull List

); }; export default PullList;