File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
pages/Sandbox/Editor/Workspace/Dependencies Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ type ModalName =
7373 | 'preferences'
7474 | 'privacyServerWarning'
7575 | 'share'
76+ | 'searchDependencies'
7677 | 'signInForTemplates' ;
7778export const modalOpened : Action < { modal : ModalName ; message ?: string } > = (
7879 { state, effects } ,
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { inject , hooksObserver } from 'app/componentConnectors ' ;
2+ import { useOvermind } from 'app/overmind ' ;
33
44import { Button } from '@codesandbox/common/lib/components/Button' ;
55
66import { ButtonContainer } from './elements' ;
77
8- function AddVersion ( { signals, children } ) {
8+ export const AddVersion : React . FC = ( { children } ) => {
9+ const {
10+ actions : { modalOpened } ,
11+ } = useOvermind ( ) ;
912 return (
1013 < div style = { { position : 'relative' } } >
1114 < ButtonContainer >
1215 < Button
1316 block
1417 small
1518 onClick = { ( ) =>
16- signals . modalOpened ( {
19+ modalOpened ( {
1720 modal : 'searchDependencies' ,
1821 } )
1922 }
@@ -23,6 +26,4 @@ function AddVersion({ signals, children }) {
2326 </ ButtonContainer >
2427 </ div >
2528 ) ;
26- }
27-
28- export default inject ( 'signals' ) ( hooksObserver ( AddVersion ) ) ;
29+ } ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import React, { FunctionComponent } from 'react';
66import { useOvermind } from 'app/overmind' ;
77import { WorkspaceSubtitle } from '../elements' ;
88
9- import AddVersion from './AddVersion' ;
9+ import { AddVersion } from './AddVersion' ;
1010import { VersionEntry } from './VersionEntry' ;
1111import AddResource from './AddResource' ;
1212import ExternalResource from './ExternalResource' ;
You can’t perform that action at this time.
0 commit comments