import React, { useContext } from 'react'; import TableContext from './TableContext'; /** * Table footer. */ export default function TableFooter() { const { props: { footer }, table: { footerGroups }, } = useContext(TableContext); // Can't contiunue if the footer is disabled. if (!footer) { return null; } return (
{footerGroups.map((group) => (
{group.headers.map((column) => (
{column.render('Footer')}
))}
))}
); }