mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
pass layout to navbar and footer
This commit is contained in:
parent
391344489d
commit
808922b50d
1 changed files with 11 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
var React = require('react');
|
||||
var connect = require('react-redux').connect;
|
||||
var classNames = require('classnames');
|
||||
|
||||
var Navigation = require('../../navigation/www/navigation.jsx');
|
||||
|
@ -13,17 +14,24 @@ var Page = React.createClass({
|
|||
return (
|
||||
<div className="page">
|
||||
<div id="navigation" className={classes}>
|
||||
<Navigation />
|
||||
<Navigation layout={this.props.layout}/>
|
||||
</div>
|
||||
<div id="view">
|
||||
{this.props.children}
|
||||
</div>
|
||||
<div id="footer">
|
||||
<Footer />
|
||||
<Footer layout={this.props.layout}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = Page;
|
||||
var mapStateToProps = function (state) {
|
||||
return {
|
||||
layout: state.layout
|
||||
};
|
||||
};
|
||||
|
||||
var ConnectedPage = connect(mapStateToProps)(Page);
|
||||
module.exports = ConnectedPage;
|
||||
|
|
Loading…
Reference in a new issue