Skip to content

Commit

Permalink
Merge pull request #942 from biomage-org/minor-refactorings
Browse files Browse the repository at this point in the history
Minor refactorings
  • Loading branch information
cosa65 authored Nov 22, 2023
2 parents f317670 + a7ee835 commit ed081bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import fetchAPI from 'utils/http/fetchAPI';
import GEM2SLoadingScreen from 'components/GEM2SLoadingScreen';
import '__test__/test-utils/setupTests';

const { Title, Text } = Typography;
const { Title } = Typography;

const mockStore = configureMockStore([thunk]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const CellSetsTool = (props) => {
setTreeData(composeTree(hierarchy, properties));
}, [hierarchy, properties]);

const [numSelectedCellSetKeys, setNumSelectedCellSetKeys] = useState(0);
const [selectedCellsCount, setSelectedCellsCount] = useState(0);

useEffect(() => {
const louvainClusters = hierarchy.find(({ key }) => key === 'louvain')?.children;
Expand All @@ -94,7 +94,7 @@ const CellSetsTool = (props) => {
const numSelectedFiltered = new Set([...selectedCells]
.filter((cellIndex) => filteredCellIds.current.has(cellIndex)));

setNumSelectedCellSetKeys(numSelectedFiltered.size);
setSelectedCellsCount(numSelectedFiltered.size);
}, [selectedCellSetKeys, properties]);

const onNodeUpdate = useCallback((key, data) => {
Expand Down Expand Up @@ -124,7 +124,7 @@ const CellSetsTool = (props) => {
const renderContent = () => {
let operations = null;

if (numSelectedCellSetKeys > 0) {
if (selectedCellSetKeys.length > 0) {
operations = (
<Space style={{ marginBottom: '10px' }}>
<SubsetCellSetsOperation
Expand Down Expand Up @@ -164,7 +164,7 @@ const CellSetsTool = (props) => {
helpTitle='Create new cell set from the complement of the selected sets in the current tab.'
/>
<Text type='primary' id='selectedCellSets'>
{`${numSelectedCellSetKeys} cell${numSelectedCellSetKeys === 1 ? '' : 's'} selected`}
{`${selectedCellsCount} cell${selectedCellsCount === 1 ? '' : 's'} selected`}
</Text>
</Space>
);
Expand Down
4 changes: 3 additions & 1 deletion src/utils/upload/validateSeurat.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const validateSeurat = async () => {};
const validateSeurat = async () => {
// Currently there is no content checking for H5 files
};

export default validateSeurat;

0 comments on commit ed081bf

Please sign in to comment.