diff options
Diffstat (limited to 'frontend/src/actions')
| -rw-r--r-- | frontend/src/actions/modals/prefabs.js | 14 | ||||
| -rw-r--r-- | frontend/src/actions/prefabs.js | 32 |
2 files changed, 46 insertions, 0 deletions
diff --git a/frontend/src/actions/modals/prefabs.js b/frontend/src/actions/modals/prefabs.js new file mode 100644 index 00000000..826565d2 --- /dev/null +++ b/frontend/src/actions/modals/prefabs.js @@ -0,0 +1,14 @@ +export const OPEN_NEW_PREFAB_MODAL = 'OPEN_NEW_PREFAB_MODAL' +export const CLOSE_NEW_PREFAB_MODAL = 'CLOSE_PREFAB_MODAL' + +export function openNewPrefabModal() { + return { + type: OPEN_NEW_PREFAB_MODAL, + } +} + +export function closeNewPrefabModal() { + return { + type: CLOSE_NEW_PREFAB_MODAL, + } +} diff --git a/frontend/src/actions/prefabs.js b/frontend/src/actions/prefabs.js new file mode 100644 index 00000000..c112feed --- /dev/null +++ b/frontend/src/actions/prefabs.js @@ -0,0 +1,32 @@ +export const ADD_PREFAB = 'ADD_PREFAB' +export const DELETE_PREFAB = 'DELETE_PREFAB' +export const DELETE_PREFAB_SUCCEEDED = 'DELETE_PREFAB_SUCCEEDED' +export const OPEN_PREFAB_SUCCEEDED = 'OPEN_PREFAB_SUCCEEDED' + +export function addPrefab(name) { + return { + type: ADD_PREFAB, + name, + } +} + +export function deletePrefab(id) { + return { + type: DELETE_PREFAB, + id, + } +} + +export function deletePrefabSucceeded(id) { + return { + type: DELETE_PREFAB_SUCCEEDED, + id, + } +} + +export function openPrefabSucceeded(id) { + return { + type: OPEN_PREFAB_SUCCEEDED, + id, + } +} |
