Skip to content

Commit d3f8645

Browse files
author
avin_kumar
committed
fixed ts errors for modal acrtions
1 parent 32b2396 commit d3f8645

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/app/src/app/overmind/actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ type ModalName =
7676
| 'share'
7777
| 'searchDependencies'
7878
| 'signInForTemplates';
79+
7980
export const modalOpened: Action<{ modal: ModalName; message?: string }> = (
8081
{ state, effects },
8182
{ modal, message }
@@ -85,7 +86,7 @@ export const modalOpened: Action<{ modal: ModalName; message?: string }> = (
8586
state.currentModal = modal;
8687
};
8788

88-
export const modalClosed: Action<any> = ({ state, effects }) => {
89+
export const modalClosed: Action = ({ state, effects }) => {
8990
// We just start it whenever it closes, if already started nothing happens
9091
if (state.currentModal === 'preferences') {
9192
effects.keybindingManager.start();

packages/app/src/app/pages/common/Modals/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ const Modals: React.FC = () => {
195195
<Modal
196196
isOpen={Boolean(modal)}
197197
width={modal && modal.width}
198-
onClose={isKeyDown => actions.modalClosed({ isKeyDown })}
198+
onClose={isKeyDown => actions.modalClosed()}
199199
>
200200
{modal
201201
? React.createElement(modal.Component, {
202-
closeModal: () => actions.modalClosed({ isKeyDown: false }),
202+
closeModal: () => actions.modalClosed(),
203203
})
204204
: null}
205205
</Modal>

0 commit comments

Comments
 (0)