import React, { useState } from "react"; import dataImage1 from "../../assets/images/data-table-user-1.png"; import LoadingSpinner from "../Spinners/LoadingSpinner"; import { useNavigate, useLocation, Link } from "react-router-dom"; import { handlePagingFunc } from "../Pagination/HandlePagination"; import PaginatedList from "../Pagination/PaginatedList"; import { useDispatch } from "react-redux"; import { tableReload } from "../../store/TableReloads"; import { PriceFormatter } from "../Helpers/PriceFormatter"; import familyImage from '../../assets/images/no-family-side.png' export default function OthersInterestTable({othersInterestedList, className}) { const dispatch = useDispatch() const navigate = useNavigate(); let { pathname } = useLocation(); const filterCategories = ["All Categories", "Explore", "Featured"]; const [selectedCategory, setCategory] = useState(filterCategories[0]); const [currentPage, setCurrentPage] = useState(0); const indexOfFirstItem = Number(currentPage); const indexOfLastItem = Number(indexOfFirstItem) + Number(process.env.REACT_APP_ITEM_PER_PAGE); const currentOthersInterestedList = othersInterestedList?.data?.slice(indexOfFirstItem, indexOfLastItem); const handlePagination = (e) => { handlePagingFunc(e, setCurrentPage); }; return (
{othersInterestedList?.loading ? (
) : othersInterestedList?.data?.length > 0 ? ( {/* */} {currentOthersInterestedList?.map((item, index) => { const image = localStorage.getItem("session_token") ? `${othersInterestedList.imageServer}${localStorage.getItem("session_token")}/job/${ item.job_uid }` : ""; return ( ); }) }
Name Last Login No of Tasks
data

{item?.title}

{item?.expire}

{item?.client_name}

{/* {formatNumber(item?.price * 0.01)} */} {PriceFormatter(item?.price * 0.01,item?.currency_code,item?.currency)}
) : (

No Offer list avaliable.

Add Family
) } {/* PAGINATION BUTTON */} = othersInterestedList?.data?.length ? true : false } data={othersInterestedList?.data} start={indexOfFirstItem} stop={indexOfLastItem} /> {/* END OF PAGINATION BUTTON */}
); }