From 152020982072b0e368913a1c91c0de69b421568d Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Wed, 29 Jan 2020 10:32:18 +0000 Subject: [PATCH] fixed usage of capablities in details page --- .../sections/alert_details/components/alert_details.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/sections/alert_details/components/alert_details.tsx b/x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/sections/alert_details/components/alert_details.tsx index d38a5eba02046..ffdf846efd49d 100644 --- a/x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/sections/alert_details/components/alert_details.tsx +++ b/x-pack/legacy/plugins/triggers_actions_ui/np_ready/public/application/sections/alert_details/components/alert_details.tsx @@ -44,11 +44,9 @@ export const AlertDetails: React.FunctionComponent = ({ unmuteAlert, muteAlert, }) => { - const { - legacy: { capabilities }, - } = useAppDependencies(); + const { capabilities } = useAppDependencies(); - const canSave = hasSaveAlertsCapability(capabilities.get()); + const canSave = hasSaveAlertsCapability(capabilities); const actionTypesByTypeId = indexBy(actionTypes, 'id'); const [firstAction, ...otherActions] = alert.actions;