2015-06-05 11:06:36 +02:00
|
|
|
'use strict';
|
|
|
|
|
2015-05-13 16:26:12 +02:00
|
|
|
import React from 'react';
|
2015-10-02 11:03:42 +02:00
|
|
|
|
2016-01-19 15:00:50 +01:00
|
|
|
import AppBase from './app_base';
|
2016-01-08 11:44:25 +01:00
|
|
|
import Header from './header';
|
2015-05-15 15:38:25 +02:00
|
|
|
|
2015-05-18 18:00:12 +02:00
|
|
|
|
2015-05-20 12:00:16 +02:00
|
|
|
let AscribeApp = React.createClass({
|
2015-09-30 17:09:46 +02:00
|
|
|
propTypes: {
|
2016-01-19 15:00:50 +01:00
|
|
|
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
|
|
|
|
|
2015-09-30 17:09:46 +02:00
|
|
|
children: React.PropTypes.oneOfType([
|
|
|
|
React.PropTypes.arrayOf(React.PropTypes.element),
|
|
|
|
React.PropTypes.element
|
2016-01-19 15:00:50 +01:00
|
|
|
])
|
2015-09-30 17:09:46 +02:00
|
|
|
},
|
|
|
|
|
2015-05-18 18:00:12 +02:00
|
|
|
render() {
|
2016-01-08 11:44:25 +01:00
|
|
|
const { children, routes } = this.props;
|
2015-09-30 17:09:46 +02:00
|
|
|
|
2015-05-18 18:00:12 +02:00
|
|
|
return (
|
2016-01-19 15:04:46 +01:00
|
|
|
<div className="ascribe-default-app">
|
2015-10-06 10:20:36 +02:00
|
|
|
<Header routes={routes} />
|
2016-01-19 15:04:46 +01:00
|
|
|
<div className="container ascribe-body">
|
|
|
|
{/* Routes are injected here */}
|
2015-10-19 10:30:14 +02:00
|
|
|
{children}
|
2015-10-09 02:00:02 +02:00
|
|
|
</div>
|
2015-06-05 11:06:36 +02:00
|
|
|
</div>
|
2015-05-18 18:00:12 +02:00
|
|
|
);
|
|
|
|
}
|
2015-05-20 12:00:16 +02:00
|
|
|
});
|
2015-05-13 16:26:12 +02:00
|
|
|
|
2016-01-19 15:00:50 +01:00
|
|
|
export default AppBase(AscribeApp);
|