Skip to content

Commit

Permalink
fix: removed isRefetching
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoalee committed Oct 1, 2024
1 parent ade19f1 commit 0e072c8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const CreateMetaAnalysisSpecificationAlgorithmStep: React.FC<{
nextButtonDisabled={!algorithmSpec.estimator}
nextButtonStyle="contained"
onButtonClick={handleNavigate}
prevButtonDisabled
/>
</Box>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ const CreateMetaAnalysisSpecificationDialogBase: React.FC<IDialog> = (props) =>
const handleNavigate = (button: ENavigationButton) => {
setActiveStep((prev) => {
if (button === ENavigationButton.NEXT) {
if (activeStep < 3) return prev + 1;
if (prev < 3) return prev + 1;
return prev;
} else {
if (activeStep > 0) return prev - 1;
if (prev > 0) return prev - 1;
return prev;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ const CreateMetaAnalysisSpecificationSelectionStep: React.FC<{
const [selectedValue, setSelectedValue] = useState<IAnalysesSelection>(props.selection);

const handleNavigate = (button: ENavigationButton) => {
if (selectedValue?.selectionKey && selectedValue?.type !== EPropertyType.NONE)
if (selectedValue?.selectionKey && selectedValue?.type !== EPropertyType.NONE) {
props.onChooseSelection({
...selectedValue,
});
}
props.onNavigate(button);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const ProjectPage: React.FC = (props) => {
borderTopRightRadius: '6px',
borderColor: 'lightgray',
borderBottom: '0px',
marginBottom: '-1px',
marginBottom: '-2px',
},
'.MuibuttonBase-root': {},
transition: 'none',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ const ProjectViewMetaAnalyses: React.FC = () => {
.filter((id): id is string => id !== undefined);
}
}
const {
data = [],
isLoading,
isError,
isRefetching,
} = useGetMetaAnalysesByIds(metaAnalysisIds);
const { data = [], isLoading, isError } = useGetMetaAnalysesByIds(metaAnalysisIds);
const canEditMetaAnalyses = useProjectMetaAnalysisCanEdit();
const projectIdFromProject = useProjectId();
const [createMetaAnalysisDialogIsOpen, setCreateMetaAnalysisDialogIsOpen] = useState(false);
Expand All @@ -49,7 +44,7 @@ const ProjectViewMetaAnalyses: React.FC = () => {
);

return (
<StateHandlerComponent isLoading={isLoading || isRefetching} isError={isError}>
<StateHandlerComponent isLoading={isLoading} isError={isError}>
<CreateMetaAnalysisSpecificationDialogBase
isOpen={createMetaAnalysisDialogIsOpen}
onCloseDialog={() => setCreateMetaAnalysisDialogIsOpen(false)}
Expand Down

0 comments on commit 0e072c8

Please sign in to comment.