Skip to content

Commit

Permalink
disable save btn on absence of images and labels
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Jul 29, 2024
1 parent f6ac7b9 commit aba55c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/MainLayout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ export const MainLayout = ({
!nextImage || (nextImage.regions && nextImage.regions.length > 0)
const selectedImages = state.images.filter((image) => image.selected)
const hasRegions = state.images[state.selectedImage]?.regions?.length > 0
const disableRegion = hasRegions ? false : !state.hasNewChange
const disableRegion = !(state.images.length > 0 && state.regionClsList.length > 0); // enable save button for all cases
// hasRegions ? false : !state.hasNewChange

return (
<ThemeProvider theme={theme}>
Expand Down

0 comments on commit aba55c9

Please sign in to comment.