summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/actions/prefabs.js
blob: c112feed18772205048d07f127546c71997348d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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,
    }
}