pitaya-launcher/js/components/edit-view.jsx

31 lines
587 B
React
Raw Normal View History

2015-08-28 14:20:07 +02:00
var React = require('react');
2015-09-03 15:50:23 +02:00
var connect = require('react-redux').connect;
2015-08-28 14:20:07 +02:00
var DesktopAppList = require('./desktop-app-list.jsx');
2015-09-03 15:50:23 +02:00
var actions = require('../actions');
2015-08-28 14:20:07 +02:00
2015-09-03 15:50:23 +02:00
var EditView = React.createClass({
componentDidMount: function() {
this.props.dispatch(actions.edit.loadDesktopApps());
},
2015-08-28 14:20:07 +02:00
render: function() {
return (
<div className="edit">
2015-09-03 15:50:23 +02:00
<DesktopAppList desktopApps={this.props.desktopApps} />
2015-08-28 14:20:07 +02:00
</div>
);
}
});
2015-09-03 15:50:23 +02:00
function select(state) {
return {
desktopApps: state.desktopApps
};
}
module.exports = connect(select)(EditView);