1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/public/js/UnleashApp.jsx

58 lines
1.7 KiB
React
Raw Normal View History

2015-03-17 22:21:49 +01:00
var React = require('react');
var TabView = require('./components/TabView');
var Menu = require('./components/Menu');
var UserStore = require('./stores/UserStore');
var ErrorMessages = require('./components/ErrorMessages');
2015-03-17 22:52:10 +01:00
var initalizer = require('./stores/initalizer');
2015-03-17 22:21:49 +01:00
var LogEntriesComponent = React.createFactory(require('./components/log/LogEntriesComponent'));
var FeatureTogglesComponent = React.createFactory(require('./components/feature/FeatureTogglesComponent'));
var StrategiesComponent = React.createFactory(require('./components/strategy/StrategiesComponent'));
var ArchiveFeatureComponent = React.createFactory(require('./components/feature/ArchiveFeatureComponent'));
UserStore.init();
var tabPanes = [
{
name: 'Feature Toggles',
slug: 'feature-toggles',
content: new FeatureTogglesComponent({})
},
{
name: 'Strategies',
slug: 'strategies',
content: new StrategiesComponent({})
},
{
name: "Log",
slug: 'log',
content: new LogEntriesComponent({})
},
{
name: "Archive",
slug: 'archive',
content: new ArchiveFeatureComponent({})
}
];
var UnleashApp = React.createClass({
2015-03-17 22:52:10 +01:00
componentWillMount: function() {
initalizer(30);
2015-03-17 22:21:49 +01:00
},
render: function () {
return (
<div>
<Menu />
<div className="container">
<div className="page">
<ErrorMessages />
<TabView tabPanes={tabPanes} />
</div>
</div>
</div>
);
}
});
module.exports = UnleashApp;