Commit 808922b5 authored by Technoboy10's avatar Technoboy10

pass layout to navbar and footer

parent 39134448
var React = require('react'); var React = require('react');
var connect = require('react-redux').connect;
var classNames = require('classnames'); var classNames = require('classnames');
var Navigation = require('../../navigation/www/navigation.jsx'); var Navigation = require('../../navigation/www/navigation.jsx');
...@@ -13,17 +14,24 @@ var Page = React.createClass({ ...@@ -13,17 +14,24 @@ var Page = React.createClass({
return ( return (
<div className="page"> <div className="page">
<div id="navigation" className={classes}> <div id="navigation" className={classes}>
<Navigation /> <Navigation layout={this.props.layout}/>
</div> </div>
<div id="view"> <div id="view">
{this.props.children} {this.props.children}
</div> </div>
<div id="footer"> <div id="footer">
<Footer /> <Footer layout={this.props.layout}/>
</div> </div>
</div> </div>
); );
} }
}); });
module.exports = Page; var mapStateToProps = function (state) {
return {
layout: state.layout
};
};
var ConnectedPage = connect(mapStateToProps)(Page);
module.exports = ConnectedPage;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment