File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export const modalOpened: Action<{ modal: ModalName; message?: string }> = (
8585 state . currentModal = modal ;
8686} ;
8787
88- export const modalClosed : Action = ( { state, effects } ) => {
88+ export const modalClosed : Action < any > = ( { state, effects } ) => {
8989 // We just start it whenever it closes, if already started nothing happens
9090 if ( state . currentModal === 'preferences' ) {
9191 effects . keybindingManager . start ( ) ;
Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ const modals = {
140140 } ,
141141} ;
142142
143- const Modals = ( ) => {
143+ const Modals : React . FC = ( ) => {
144144 const {
145- actions : { modalClosed } ,
145+ actions,
146146 state : {
147147 editor : { currentSandbox } ,
148148 preferences : {
@@ -195,16 +195,15 @@ const Modals = () => {
195195 < Modal
196196 isOpen = { Boolean ( modal ) }
197197 width = { modal && modal . width }
198- onClose = { isKeyDown => modalClosed ( { isKeyDown } ) }
198+ onClose = { isKeyDown => actions . modalClosed ( { isKeyDown } ) }
199199 >
200200 { modal
201201 ? React . createElement ( modal . Component , {
202- closeModal : ( ) => modalClosed ( { isKeyDown : false } ) ,
202+ closeModal : ( ) => actions . modalClosed ( { isKeyDown : false } ) ,
203203 } )
204204 : null }
205205 </ Modal >
206206 </ ThemeProvider >
207207 ) ;
208208} ;
209- export default Modals ;
210- // export default inject('store', 'signals')(observer(Modals));
209+ export { Modals } ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import Loadable from 'app/utils/Loadable';
1111import { useOvermind } from 'app/overmind' ;
1212import { ErrorBoundary } from './common/ErrorBoundary' ;
1313import HTML5Backend from './common/HTML5BackendWithFolderSupport' ;
14- import Modals from './common/Modals' ;
14+ import { Modals } from './common/Modals' ;
1515import Sandbox from './Sandbox' ;
1616import { NewSandbox } from './NewSandbox' ;
1717import Dashboard from './Dashboard' ;
You can’t perform that action at this time.
0 commit comments