@@ -12,12 +12,14 @@ import {
12
12
GET_APP_INSTANCE ,
13
13
POST_APP_INSTANCE_RESOURCE ,
14
14
APP_INSTANCE_RESOURCE_TYPES ,
15
+ POST_ACTION ,
15
16
} from '../../types' ;
16
17
import {
17
18
getAppInstanceResources ,
18
19
patchAppInstanceResource ,
19
20
postAppInstanceResource ,
20
21
getAppInstance ,
22
+ postAction ,
21
23
} from '../../actions' ;
22
24
import {
23
25
DEFAULT_LANGUAGE ,
@@ -45,6 +47,7 @@ class PhaseApp extends Component {
45
47
name : PropTypes . string ,
46
48
folder : PropTypes . string . isRequired ,
47
49
dispatchGetAppInstance : PropTypes . func . isRequired ,
50
+ dispatchPostAction : PropTypes . func . isRequired ,
48
51
id : PropTypes . string . isRequired ,
49
52
phaseId : PropTypes . string . isRequired ,
50
53
spaceId : PropTypes . string . isRequired ,
@@ -101,7 +104,11 @@ class PhaseApp extends Component {
101
104
102
105
handleReceiveMessage = event => {
103
106
try {
104
- const { dispatchGetAppInstance, appInstance } = this . props ;
107
+ const {
108
+ dispatchGetAppInstance,
109
+ appInstance,
110
+ dispatchPostAction,
111
+ } = this . props ;
105
112
106
113
// get app instance id in message
107
114
const { id : componentAppInstanceId } = appInstance || { } ;
@@ -122,6 +129,8 @@ class PhaseApp extends Component {
122
129
return patchAppInstanceResource ( payload , this . postMessage ) ;
123
130
case GET_APP_INSTANCE :
124
131
return dispatchGetAppInstance ( payload , this . postMessage ) ;
132
+ case POST_ACTION :
133
+ return dispatchPostAction ( payload , this . postMessage ) ;
125
134
default :
126
135
return false ;
127
136
}
@@ -280,6 +289,7 @@ const mapStateToProps = ({ User, Space }) => ({
280
289
281
290
const mapDispatchToProps = {
282
291
dispatchGetAppInstance : getAppInstance ,
292
+ dispatchPostAction : postAction ,
283
293
} ;
284
294
285
295
const ConnectedComponent = connect (
0 commit comments