Browse Source

renamed app parameter

Skylsmoi 6 years ago
parent
commit
9b583c07d8
2 changed files with 6 additions and 6 deletions
  1. 5 5
      src/container/Thread.jsx
  2. 1 1
      src/index.js

+ 5 - 5
src/container/Thread.jsx View File

44
     this.state = {
44
     this.state = {
45
       appName: 'Thread',
45
       appName: 'Thread',
46
       isVisible: true,
46
       isVisible: true,
47
-      loggedUser: props.app ? props.app.loggedUser : debug.loggedUser,
48
-      workspace: props.app ? props.app.workspace : debug.workspace,
49
-      content: props.app ? props.app.content : debug.content,
50
-      listMessage: props.app ? props.app.content.message_list : debug.listMessage,
51
-      appConfig: props.app ? props.app.appConfig : debug.appConfig
47
+      loggedUser: props.data ? props.data.loggedUser : debug.loggedUser,
48
+      workspace: props.data ? props.data.workspace : debug.workspace,
49
+      content: props.data ? props.data.content : debug.content,
50
+      listMessage: props.data ? props.data.content.message_list : debug.listMessage,
51
+      appConfig: props.data ? props.data.appConfig : debug.appConfig
52
     }
52
     }
53
 
53
 
54
     document.addEventListener('appCustomEvent', this.customEventReducer)
54
     document.addEventListener('appCustomEvent', this.customEventReducer)

+ 1 - 1
src/index.js View File

9
   isRendered: false,
9
   isRendered: false,
10
   renderApp: (domId, data) => {
10
   renderApp: (domId, data) => {
11
     return ReactDOM.render(
11
     return ReactDOM.render(
12
-      <Thread file={data} />
12
+      <Thread data={data} />
13
       , document.getElementById(domId)
13
       , document.getElementById(domId)
14
     )
14
     )
15
   },
15
   },