diff --git a/client/app/pages/alert/AlertView.jsx b/client/app/pages/alert/AlertView.jsx index 0bf98d9ba1..c128140b56 100644 --- a/client/app/pages/alert/AlertView.jsx +++ b/client/app/pages/alert/AlertView.jsx @@ -68,13 +68,23 @@ export default class AlertView extends React.Component { <> <DynamicComponent name="AlertView.HeaderExtra" alert={alert} /> - <Tooltip title={canEdit ? "" : "You do not have sufficient permissions to edit this alert"}> - <Button type="default" onClick={canEdit ? onEdit : null} className={cx({ disabled: !canEdit })}> - <i className="fa fa-edit m-r-5" aria-hidden="true" /> - Edit - </Button> - {menuButton} - </Tooltip> + {canEdit ? ( + <> + <Button type="default" onClick={canEdit ? onEdit : null} className={cx({ disabled: !canEdit })}> + <i className="fa fa-edit m-r-5" aria-hidden="true" /> + Edit + </Button> + {menuButton} + </> + ) : ( + <Tooltip title="You do not have sufficient permissions to edit this alert"> + <Button type="default" onClick={canEdit ? onEdit : null} className={cx({ disabled: !canEdit })}> + <i className="fa fa-edit m-r-5" aria-hidden="true" /> + Edit + </Button> + {menuButton} + </Tooltip> + )}