import React, { useState } from 'react' import { handlePagingFunc } from '../../../Pagination/HandlePagination'; import PaginatedList from '../../../Pagination/PaginatedList'; import RelativePopout from './RelativePopout'; import RelativeReminderPopout from './RelativeReminderPopout'; export default function RelativeTable({relativeList, familyList}) { // Handle Pagination const [currentPage, setCurrentPage] = useState(0); const indexOfFirstItem = Number(currentPage); const indexOfLastItem =Number(indexOfFirstItem) + Number(process.env.REACT_APP_ITEM_PER_PAGE); const currentRelativeList = relativeList?.slice(indexOfFirstItem, indexOfLastItem); const [relativePopout, setRelativePopout] = useState({show:false, data:null}) const [reminderPopout, setReminderPopout] = useState({show:false, data:null}) const closePopout = () => { setRelativePopout({show:false, data:null}) } const closeReminderPopout = () => { setReminderPopout({show:false, data:null}) } const handlePagination = (e) => { handlePagingFunc(e, setCurrentPage); }; return ( <>
| Status | Kids | ||||
|---|---|---|---|---|---|
{value.firstname && value.firstname} {value.lastname && value.lastname}{value.email && value.email} |
{/* Family Type */} {value.family_type && value.family_type.toUpperCase()} | {value.status_action ?: | {value.status && value.status} | }{value.kid_count && value.kid_count} | |
| No Members Found |