Skip to content

Commit

Permalink
remove extra onClick and make disabled prop optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Damans227 committed Dec 1, 2021
1 parent 511b4b8 commit eca9815
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface EstimateQueryCostButtonProps {
queryCostEstimate: Record<string, any>;
selectedText?: string;
tooltip?: string;
disabled: boolean;
disabled?: boolean;
}

const EstimateQueryCostButton = ({
Expand All @@ -56,10 +56,6 @@ const EstimateQueryCostButton = ({
[cost],
);

const onClick = () => {
getEstimate();
};

const renderModalBody = () => {
if (queryCostEstimate.error !== null) {
return (
Expand Down Expand Up @@ -95,7 +91,7 @@ const EstimateQueryCostButton = ({
triggerNode={
<Button
style={{ height: 32, padding: '4px 15px' }}
onClick={onClick}
onClick={getEstimate()}
key="query-estimate-btn"
tooltip={tooltip}
disabled={disabled}
Expand Down

0 comments on commit eca9815

Please sign in to comment.