Skip to content

Commit

Permalink
update AddEndpointExceptionComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed Aug 3, 2021
1 parent 6270a49 commit e5d06d2
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,11 @@ import * as i18n from '../translations';

interface AddExceptionProps {
disabled?: boolean;
eventKind?: string | null | undefined;
onClick: () => void;
ruleId: string | null | undefined;
}

const AddExceptionComponent: React.FC<AddExceptionProps> = ({
disabled,
eventKind,
onClick,
ruleId,
}) => {
return eventKind === 'event' && ruleId ? (
const AddExceptionComponent: React.FC<AddExceptionProps> = ({ disabled, onClick }) => {
return (
<EuiContextMenuItem
key="add-exception-menu-item"
aria-label={i18n.ACTION_ADD_EXCEPTION}
Expand All @@ -35,7 +28,7 @@ const AddExceptionComponent: React.FC<AddExceptionProps> = ({
{i18n.ACTION_ADD_EXCEPTION}
</EuiText>
</EuiContextMenuItem>
) : null;
);
};

export const AddException = React.memo(AddExceptionComponent);

0 comments on commit e5d06d2

Please sign in to comment.