Fixed a couple of SonarQube issues.

This commit is contained in:
Aditya Toshniwal
2022-09-10 14:04:28 +05:30
committed by Akshay Joshi
parent 43022b7aa2
commit b128ba2f57
16 changed files with 175 additions and 145 deletions

View File

@@ -741,12 +741,12 @@ function SchemaDialogView({
onClose={onErrClose} />
</Box>
{showFooter && <Box className={classes.footer}>
{useMemo(()=>((!props.disableSqlHelp || !props.disableDialogHelp) && <Box>
{(!props.disableSqlHelp || !props.disableDialogHelp) && <Box>
<PgIconButton data-test="sql-help" onClick={()=>props.onHelp(true, isNew)} icon={<InfoIcon />}
disabled={props.disableSqlHelp} className={classes.buttonMargin} title="SQL help for this object type."/>
<PgIconButton data-test="dialog-help" onClick={()=>props.onHelp(false, isNew)} icon={<HelpIcon />} title="Help for this dialog."
disabled={props.disableDialogHelp}/>
</Box>), [])}
</Box>}
<Box marginLeft="auto">
<DefaultButton data-test="Close" onClick={props.onClose} startIcon={<CloseIcon />} className={classes.buttonMargin}>
{gettext('Close')}