import { useRecoilValue } from 'recoil'; import { isNavbarSwitchingSizeState } from '@/ui/layout/states/isNavbarSwitchingSizeState'; import { RowIdContext } from '../contexts/RowIdContext'; import { RowIndexContext } from '../contexts/RowIndexContext'; import { isFetchingEntityTableDataState } from '../states/isFetchingEntityTableDataState'; import { tableRowIdsState } from '../states/tableRowIdsState'; import { EntityTableRow } from './EntityTableRow'; export function EntityTableBody() { const rowIds = useRecoilValue(tableRowIdsState); const isNavbarSwitchingSize = useRecoilValue(isNavbarSwitchingSizeState); const isFetchingEntityTableData = useRecoilValue( isFetchingEntityTableDataState, ); if (isFetchingEntityTableData || isNavbarSwitchingSize) { return null; } return (
{rowIds.map((rowId, index) => (