@@ -11,15 +11,12 @@ interface IFilesProps {
11
11
12
12
export const Files : React . FC < IFilesProps > = ( { setEditActions } ) => {
13
13
const {
14
- state : {
15
- editor : { currentSandbox : sandbox } ,
16
- isLoggedIn,
17
- } ,
18
- actions : {
19
- editor : { createZipClicked } ,
20
- } ,
14
+ state : { editor : editorState , isLoggedIn } ,
15
+ actions : { editor, files } ,
21
16
} = useOvermind ( ) ;
22
17
18
+ const { currentSandbox : sandbox } = editorState ;
19
+
23
20
const _getModulePath = moduleId => {
24
21
try {
25
22
return getModulePath ( sandbox . modules , sandbox . directories , moduleId ) ;
@@ -33,6 +30,8 @@ export const Files: React.FC<IFilesProps> = ({ setEditActions }) => {
33
30
root
34
31
getModulePath = { _getModulePath }
35
32
title = { sandbox . title || 'Project' }
33
+ signals = { { files, editor } }
34
+ store = { { editor : editorState , isLoggedIn } }
36
35
initializeProperties = { ( {
37
36
onCreateModuleClick,
38
37
onCreateDirectoryClick,
@@ -46,7 +45,7 @@ export const Files: React.FC<IFilesProps> = ({ setEditActions }) => {
46
45
forceShow = { window . __isTouch }
47
46
onCreateFile = { onCreateModuleClick }
48
47
onCreateDirectory = { onCreateDirectoryClick }
49
- onDownload = { createZipClicked }
48
+ onDownload = { editor . createZipClicked }
50
49
onUploadFile = {
51
50
isLoggedIn && sandbox . privacy === 0
52
51
? onUploadFileClick
0 commit comments