mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
35 lines
820 B
JavaScript
35 lines
820 B
JavaScript
'use strict';
|
|
|
|
import React from 'react';
|
|
|
|
import AppBase from './app_base';
|
|
import Header from './header';
|
|
|
|
|
|
let AscribeApp = React.createClass({
|
|
propTypes: {
|
|
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
|
|
|
|
children: React.PropTypes.oneOfType([
|
|
React.PropTypes.arrayOf(React.PropTypes.element),
|
|
React.PropTypes.element
|
|
])
|
|
},
|
|
|
|
render() {
|
|
const { children, routes } = this.props;
|
|
|
|
return (
|
|
<div className="ascribe-default-app">
|
|
<Header routes={routes} />
|
|
<div className="container ascribe-body">
|
|
{/* Routes are injected here */}
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
});
|
|
|
|
export default AppBase(AscribeApp);
|