Skip to content

Commit

Permalink
fixed typing
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Nov 19, 2020
1 parent 3bf8f60 commit 1ec6e70
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export const AlertDetails: React.FunctionComponent<AlertDetailsProps> = ({
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
Expand Down Expand Up @@ -172,7 +172,7 @@ export const AlertDetails: React.FunctionComponent<AlertDetailsProps> = ({
<AlertEdit
initialAlert={alert}
onClose={() => {
setInitialAlert('alert', alert);
setInitialAlert(alert);
setEditFlyoutVisibility(false);
}}
/>
Expand Down

0 comments on commit 1ec6e70

Please sign in to comment.