summaryrefslogtreecommitdiffstats
path: root/web/react/components/center_panel.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-02-25 12:59:24 -0500
committerJoramWilander <jwawilander@gmail.com>2016-02-25 12:59:24 -0500
commit493722b8f20178cadce5a2af30680481394040dc (patch)
treeaf637bd404a0ae9584b89a6f580a8825b965cca2 /web/react/components/center_panel.jsx
parent41535074623646862408c86a45e4fd26f48cf182 (diff)
downloadchat-493722b8f20178cadce5a2af30680481394040dc.tar.gz
chat-493722b8f20178cadce5a2af30680481394040dc.tar.bz2
chat-493722b8f20178cadce5a2af30680481394040dc.zip
Move post view container user store listener into center panel and pass profiles into post focus view
Diffstat (limited to 'web/react/components/center_panel.jsx')
-rw-r--r--web/react/components/center_panel.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/web/react/components/center_panel.jsx b/web/react/components/center_panel.jsx
index 97c615768..2422588cf 100644
--- a/web/react/components/center_panel.jsx
+++ b/web/react/components/center_panel.jsx
@@ -33,7 +33,8 @@ export default class CenterPanel extends React.Component {
this.state = {
showTutorialScreens: tutorialStep === TutorialSteps.INTRO_SCREENS,
showPostFocus: ChannelStore.getPostMode() === ChannelStore.POST_MODE_FOCUS,
- user: UserStore.getCurrentUser()
+ user: UserStore.getCurrentUser(),
+ profiles: JSON.parse(JSON.stringify(UserStore.getProfiles()))
};
}
componentDidMount() {
@@ -54,7 +55,7 @@ export default class CenterPanel extends React.Component {
this.setState({showPostFocus: ChannelStore.getPostMode() === ChannelStore.POST_MODE_FOCUS});
}
onUserChange() {
- this.setState({user: UserStore.getCurrentUser()});
+ this.setState({user: UserStore.getCurrentUser(), profiles: JSON.parse(JSON.stringify(UserStore.getProfiles()))});
}
render() {
const channel = ChannelStore.getCurrent();
@@ -65,7 +66,7 @@ export default class CenterPanel extends React.Component {
postsContainer = <TutorialIntroScreens/>;
createPost = null;
} else if (this.state.showPostFocus) {
- postsContainer = <PostFocusView/>;
+ postsContainer = <PostFocusView profiles={this.state.profiles}/>;
handleClick = function clickHandler(e) {
e.preventDefault();
@@ -87,7 +88,7 @@ export default class CenterPanel extends React.Component {
</div>
);
} else {
- postsContainer = <PostsViewContainer/>;
+ postsContainer = <PostsViewContainer profiles={this.state.profiles}/>;
createPost = (
<div
className='post-create__container'