48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
import React, { Component, PropTypes } from 'react';
|
|
import { createContainer } from 'meteor/react-meteor-data';
|
|
|
|
import App from './App.jsx';
|
|
|
|
import NavBarContainer from '../nav-bar/NavBarContainer.jsx';
|
|
import ActionsBarContainer from '../actions-bar/ActionsBarContainer.jsx';
|
|
import MediaContainer from '../media/MediaContainer.jsx';
|
|
|
|
const defaultProps = {
|
|
navbar: <NavBarContainer/>,
|
|
actionsbar: <ActionsBarContainer/>,
|
|
media: <MediaContainer/>,
|
|
};
|
|
|
|
class AppContainer extends Component {
|
|
constructor(props) {
|
|
super(props);
|
|
console.log('yy1', this.state);
|
|
console.log('yy', props);
|
|
this.state = {
|
|
meetingID: props.meetingID,
|
|
userID: props.userID,
|
|
authToken: props.authToken,
|
|
};
|
|
}
|
|
|
|
componentDidMount() {
|
|
console.log('COMPONENT DID MOUNT');
|
|
}
|
|
|
|
render() {
|
|
console.log('app container render');
|
|
console.log('aa', this.state);
|
|
return (
|
|
<App {...this.props}>
|
|
{this.props.children}
|
|
</App>
|
|
);
|
|
}
|
|
}
|
|
|
|
AppContainer.defaultProps = defaultProps;
|
|
|
|
export default createContainer(() => {
|
|
return {};
|
|
}, AppContainer);
|