From 1ec6e70959bdf5eeb7e556379e3faaabba573fb3 Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Thu, 19 Nov 2020 13:09:26 +0000 Subject: [PATCH] fixed typing --- .../sections/alert_details/components/alert_details.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx index b38f0e749a28d..d7de7e0a82c1e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_details.tsx @@ -75,8 +75,8 @@ export const AlertDetails: React.FunctionComponent = ({ chrome, } = useAppDependencies(); const [{}, dispatch] = useReducer(alertReducer, { alert }); - const setInitialAlert = (key: string, value: any) => { - dispatch({ command: { type: 'setAlert' }, payload: { key, value } }); + const setInitialAlert = (value: Alert) => { + dispatch({ command: { type: 'setAlert' }, payload: { key: 'alert', value } }); }; // Set breadcrumb and page title @@ -172,7 +172,7 @@ export const AlertDetails: React.FunctionComponent = ({ { - setInitialAlert('alert', alert); + setInitialAlert(alert); setEditFlyoutVisibility(false); }} />