File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,12 @@ import { MakeCodeFrame } from '@microbit/makecode-embed/react';
3434 ref= {ref}
3535 controller= {1 }
3636 controllerId= {controllerId}
37- initialProjects= {initialProjects}
38- onEditorContentLoaded= {(e ) => console .log (' editorContentLoaded' , e)}
39- onWorkspaceLoaded= {(e ) => console .log (' workspaceLoaded' , e)}
40- onWorkspaceSync= {(e ) => console .log (' workspaceSync' , e)}
41- onWorkspaceReset= {(e ) => console .log (' workspaceReset' , e)}
42- onWorkspaceEvent= {(e ) => console .log (' workspaceEvent' , e)}
37+ initialProjects= {[savedProject]}
4338 onWorkspaceSave= {(e ) => {
44- savedProjects . current ? . set ( e . project ! . header ! . id , e . project );
45- console . log ( savedProjects . current );
39+ // Set project as project changes in the editor.
40+ setSavedProject ( e . project );
4641 }}
47- onTutorialEvent= {(e ) => console .log (' tutorialEvent' , e)}
48- / >
42+ / > ;
4943```
5044
5145For more examples, take a look at the [ MakeCode frame demo source code] ( ../src/stories/MakeCodeFrame.stories.tsx ) .
You can’t perform that action at this time.
0 commit comments