@@ -38,7 +38,7 @@ const IkonButton = ({title, icon, onClick, color, disabled, id}) => {
3838 )
3939}
4040
41- const Controls = ( { project, onDownload, onSave, onDelete, owner, file, isSaving, onImport, importResponse, onDownloadImportReport, onProjectLogsClick, isProjectsLogOpen, configure, setConfigure, isStaff} ) => {
41+ const Controls = ( { project, onDownload, onSave, onDelete, owner, file, isSaving, onImport, importResponse, onDownloadImportReport, onProjectLogsClick, isProjectsLogOpen, configure, setConfigure, isStaff, loadingMatches } ) => {
4242 const { t } = useTranslation ( ) ;
4343 const [ anchorEl , setAnchorEl ] = React . useState ( null ) ;
4444 const downloadOpen = Boolean ( anchorEl ) ;
@@ -53,19 +53,19 @@ const Controls = ({project, onDownload, onSave, onDelete, owner, file, isSaving,
5353 onClick = { ( ) => setConfigure ( ! configure ) }
5454 title = { t ( 'map_project.configure_mapping_project_tooltip' ) }
5555 icon = { < SettingsIcon /> }
56+ disabled = { loadingMatches }
5657 />
5758 < IkonButton
5859 color = { isProjectsLogOpen ? 'primary' : 'secondary' }
5960 onClick = { onProjectLogsClick }
6061 title = { t ( 'map_project.project_logs_tooltip' ) }
61- disabled = { ! project ?. id }
6262 icon = { < TimelineIcon /> }
6363 />
6464 < IkonButton
6565 color = 'secondary'
6666 onClick = { onSave }
6767 title = { t ( 'map_project.save_this_project' ) }
68- disabled = { ! owner || ! file ?. name || isSaving }
68+ disabled = { ! owner || ! file ?. name || isSaving || loadingMatches }
6969 icon = { < SaveIcon /> }
7070 />
7171 < IkonButton
@@ -74,12 +74,13 @@ const Controls = ({project, onDownload, onSave, onDelete, owner, file, isSaving,
7474 onClick = { event => setAnchorEl ( event . currentTarget ) }
7575 title = { t ( 'map_project.download_this_project_as_csv' ) }
7676 icon = { < DownloadIcon /> }
77+ disabled = { loadingMatches }
7778 />
7879 {
7980 project ?. id &&
8081 < IkonButton
8182 color = 'secondary'
82- disabled = { isSaving }
83+ disabled = { isSaving || loadingMatches }
8384 onClick = { onDelete }
8485 title = { t ( 'map_project.delete_this_project' ) }
8586 icon = { < DeleteIcon /> }
0 commit comments