Skip to content

Commit 76253b8

Browse files
MichaelDeBoeySaraVieira
authored andcommitted
Make sure only existing modals can be opened (codesandbox#2554)
1 parent c22379f commit 76253b8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,19 @@ export const connectionChanged: Action<boolean> = ({ state }, connected) => {
6060
state.connected = connected;
6161
};
6262

63-
export const modalOpened: Action<{ modal: string; message?: string }> = (
63+
type ModalName =
64+
| 'deleteDeployment'
65+
| 'feedback'
66+
| 'forkServerModal'
67+
| 'liveSessionEnded'
68+
| 'moveSandbox'
69+
| 'netlifyLogs'
70+
| 'newSandbox'
71+
| 'preferences'
72+
| 'privacyServerWarning'
73+
| 'share'
74+
| 'signInForTemplates';
75+
export const modalOpened: Action<{ modal: ModalName; message?: string }> = (
6476
{ state, effects },
6577
{ modal, message }
6678
) => {

0 commit comments

Comments
 (0)