Skip to content

Commit

Permalink
code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
mauberti-bc committed Dec 6, 2024
1 parent bd9bf1c commit 72ca264
Showing 1 changed file with 26 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,34 +76,32 @@ export const SurveyBlocksTableContainer = (props: ISurveyBlocksTableContainerPro
};

return (

Check warning on line 78 in app/src/features/surveys/sampling-information/sites/table/tabs/blocks/SurveyBlocksTableContainer.tsx

View check run for this annotation

Codecov / codecov/patch

app/src/features/surveys/sampling-information/sites/table/tabs/blocks/SurveyBlocksTableContainer.tsx#L78

Added line #L78 was not covered by tests
<>
<LoadingGuard
isLoading={!blocksDataLoader.data && (blocksDataLoader.isLoading || !blocksDataLoader.isReady)}
isLoadingFallback={<SkeletonTable />}
isLoadingFallbackDelay={100}
hasNoData={!blocks.length}
hasNoDataFallback={
<NoDataOverlay
height="100%"
title="Add Clusters"
subtitle="Clusters let you group related sampling sites"
icon={mdiArrowTopRight}
/>
}
hasNoDataFallbackDelay={100}>
<SurveyBlocksTable
blocks={blocks}
paginationModel={paginationModel}
setPaginationModel={setPaginationModel}
sortModel={sortModel}
setSortModel={setSortModel}
rowCount={blocksDataLoader.data?.pagination.total ?? 0}
pageSizeOptions={pageSizeOptions}
selectedRows={selectedRows}
setSelectedRows={setSelectedRows}
onDelete={handleDelete}
<LoadingGuard
isLoading={!blocksDataLoader.data && (blocksDataLoader.isLoading || !blocksDataLoader.isReady)}
isLoadingFallback={<SkeletonTable />}
isLoadingFallbackDelay={100}
hasNoData={!blocks.length}
hasNoDataFallback={
<NoDataOverlay
height="100%"
title="Add Clusters"
subtitle="Clusters let you group related sampling sites"
icon={mdiArrowTopRight}
/>
</LoadingGuard>
</>
}
hasNoDataFallbackDelay={100}>
<SurveyBlocksTable
blocks={blocks}
paginationModel={paginationModel}
setPaginationModel={setPaginationModel}
sortModel={sortModel}
setSortModel={setSortModel}
rowCount={blocksDataLoader.data?.pagination.total ?? 0}
pageSizeOptions={pageSizeOptions}
selectedRows={selectedRows}
setSelectedRows={setSelectedRows}
onDelete={handleDelete}
/>
</LoadingGuard>
);
};

0 comments on commit 72ca264

Please sign in to comment.