// import { useState } from "react"; import MainBtn from "../MainBtn"; import Icons from "../Icons"; export default function TablePaginatedWrapper({ data = [], isFetching, pagination, setPage, children, }) { const handlePrev = () => { setPage(prev => prev - 1) }; const handleNext = () => { setPage(prev => prev + 1) }; return (
{children({ data })}
Showing {isFetching ? '----' : `page ${pagination?.current_page}`} of {pagination?.total_pages}
{isFetching && }
); } export const TableIsLoading = () => { return (

Loading...

) }