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,11 +44,11 @@ class Thread extends React.Component {
44 44
     this.state = {
45 45
       appName: 'Thread',
46 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 54
     document.addEventListener('appCustomEvent', this.customEventReducer)

+ 1 - 1
src/index.js View File

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