Skip to content

Commit

Permalink
[ML] Tweak button code.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Jul 29, 2020
1 parent 7c43179 commit ed7d8d7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ interface ViewButtonProps {
export const ViewButton: FC<ViewButtonProps> = ({ item }) => {
const navigateToPath = useNavigateToPath();

const { disabled, tooltipContent } = getViewLinkStatus(item);
const analysisType = getAnalysisType(item.config.analysis);
const { disabled: buttonDisabled, tooltipContent } = getViewLinkStatus(item);

const onClickHandler = () => navigateToPath(getResultsUrl(item.id, analysisType));

Expand All @@ -38,15 +38,15 @@ export const ViewButton: FC<ViewButtonProps> = ({ item }) => {
data-test-subj="mlAnalyticsJobViewButton"
flush="left"
iconType="visTable"
isDisabled={buttonDisabled}
isDisabled={disabled}
onClick={onClickHandler}
size="xs"
>
{buttonText}
</EuiButtonEmpty>
);

if (buttonDisabled) {
if (disabled) {
return (
<EuiToolTip position="top" content={tooltipContent}>
{button}
Expand Down

0 comments on commit ed7d8d7

Please sign in to comment.