set filename to save compiled blocks
This commit is contained in:
@@ -5,6 +5,7 @@ export const MOVE_BLOCK = 'MOVE_BLOCK';
|
||||
export const CHANGE_BLOCK = 'CHANGE_BLOCK';
|
||||
export const DELETE_BLOCK = 'DELETE_BLOCK';
|
||||
export const CLEAR_STATS = 'CLEAR_STATS';
|
||||
export const NAME = 'NAME';
|
||||
|
||||
|
||||
export const TUTORIAL_SUCCESS = 'TUTORIAL_SUCCESS';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NEW_CODE, CHANGE_WORKSPACE, CREATE_BLOCK, MOVE_BLOCK, CHANGE_BLOCK, DELETE_BLOCK, CLEAR_STATS } from './types';
|
||||
import { NEW_CODE, CHANGE_WORKSPACE, CREATE_BLOCK, MOVE_BLOCK, CHANGE_BLOCK, DELETE_BLOCK, CLEAR_STATS, NAME } from './types';
|
||||
|
||||
import * as Blockly from 'blockly/core';
|
||||
|
||||
@@ -72,3 +72,10 @@ export const clearStats = () => (dispatch) => {
|
||||
payload: stats
|
||||
});
|
||||
};
|
||||
|
||||
export const workspaceName = (name) => (dispatch) => {
|
||||
dispatch({
|
||||
type: NAME,
|
||||
payload: name
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user