diff --git a/mailpoet/assets/js/src/form-editor/components/form-settings/form-settings.tsx b/mailpoet/assets/js/src/form-editor/components/form-settings/form-settings.tsx index 1d1374b5e6..ecfee471fe 100644 --- a/mailpoet/assets/js/src/form-editor/components/form-settings/form-settings.tsx +++ b/mailpoet/assets/js/src/form-editor/components/form-settings/form-settings.tsx @@ -9,9 +9,7 @@ import { TagsPanel } from './tags-panel'; import { storeName } from '../../store'; export function FormSettings(): JSX.Element { - const dispatchResult = useDispatch(storeName); - const toggleSidebarPanel: (t1: string, ...ts: []) => void = - void dispatchResult.toggleSidebarPanel; + const { toggleSidebarPanel } = useDispatch(storeName); const openedPanels = useSelect( (select) => select(storeName).getSidebarOpenedPanels(), [],