mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
34 lines
870 B
JavaScript
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);
|