mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 04:16:37 -04:00
40 lines
No EOL
840 B
JavaScript
40 lines
No EOL
840 B
JavaScript
import React, { PropTypes, Component } from 'react';
|
|
|
|
import Core from "meteor/nova:core";
|
|
const AppComposer = Core.AppComposer;
|
|
|
|
class App extends Component {
|
|
|
|
getChildContext() {
|
|
return {
|
|
currentUser: this.props.currentUser,
|
|
currentRoute: this.props.currentRoute
|
|
};
|
|
}
|
|
|
|
render() {
|
|
|
|
({Layout, AppLoading} = Telescope.components);
|
|
|
|
if (this.props.ready) {
|
|
return <Layout currentUser={this.props.currentUser}>{this.props.content}</Layout>
|
|
} else {
|
|
return <AppLoading />
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
App.propTypes = {
|
|
ready: React.PropTypes.bool,
|
|
currentUser: React.PropTypes.object,
|
|
currentRoute: React.PropTypes.object
|
|
}
|
|
|
|
App.childContextTypes = {
|
|
currentUser: React.PropTypes.object,
|
|
currentRoute: React.PropTypes.object
|
|
}
|
|
|
|
module.exports = AppComposer(App);
|
|
export default AppComposer(App); |