1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 09:50:31 +01:00
onion/js/components/ascribe_app.js

34 lines
870 B
JavaScript

'use strict';
import React from 'react';
import AppBase from './app_base';
import Footer from './footer';
import Header from './header';
let AscribeApp = React.createClass({
propTypes: {
activeRoute: React.PropTypes.object.isRequired,
children: React.PropTypes.element.isRequired,
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
},
render() {
const { activeRoute, children, routes } = this.props;
return (
<div className="ascribe-default-app">
<Header routes={routes} />
<div className="container ascribe-body">
{/* Routes are injected here */}
{children}
</div>
<Footer activeRoute={activeRoute} />
</div>
);
}
});
export default AppBase(AscribeApp);