diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-11-19 14:29:04 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-11-19 14:29:04 +0100 |
commit | d2f51aa66b50cd058d8b2beafd5da70c84a47d95 (patch) | |
tree | f549dfea80a543ed17fcb03b5553a83d3848acbb /src/web/js/components/MiddlePanel.react.js | |
parent | Fixed problem with version of GLIBC_PRIVATE not defined in file libc.so.6 wit... (diff) | |
parent | Updated Python runtime to 3.6.2 on Heroku. (diff) | |
download | newspipe-d2f51aa66b50cd058d8b2beafd5da70c84a47d95.tar.gz newspipe-d2f51aa66b50cd058d8b2beafd5da70c84a47d95.tar.bz2 newspipe-d2f51aa66b50cd058d8b2beafd5da70c84a47d95.zip |
Merge branch 'master' of github.com:JARR-aggregator/JARR
Diffstat (limited to 'src/web/js/components/MiddlePanel.react.js')
-rw-r--r-- | src/web/js/components/MiddlePanel.react.js | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/web/js/components/MiddlePanel.react.js b/src/web/js/components/MiddlePanel.react.js index 2a8ab96e..fc7c763a 100644 --- a/src/web/js/components/MiddlePanel.react.js +++ b/src/web/js/components/MiddlePanel.react.js @@ -1,9 +1,11 @@ var React = require('react'); +var createReactClass = require('create-react-class'); var Row = require('react-bootstrap/lib/Row'); var Button = require('react-bootstrap/lib/Button'); var ButtonGroup = require('react-bootstrap/lib/ButtonGroup'); var Glyphicon = require('react-bootstrap/lib/Glyphicon'); +var PropTypes = require('prop-types'); var MiddlePanelStore = require('../stores/MiddlePanelStore'); var MiddlePanelActions = require('../actions/MiddlePanelActions'); @@ -11,16 +13,16 @@ var RightPanelActions = require('../actions/RightPanelActions'); var JarrTime = require('./time.react'); -var TableLine = React.createClass({ - propTypes: {article_id: React.PropTypes.number.isRequired, - feed_title: React.PropTypes.string.isRequired, - icon_url: React.PropTypes.string, - title: React.PropTypes.string.isRequired, - rel_date: React.PropTypes.string.isRequired, - date: React.PropTypes.string.isRequired, - read: React.PropTypes.bool.isRequired, - selected: React.PropTypes.bool.isRequired, - liked: React.PropTypes.bool.isRequired, +var TableLine = createReactClass({ + propTypes: {article_id: PropTypes.number.isRequired, + feed_title: PropTypes.string.isRequired, + icon_url: PropTypes.string, + title: PropTypes.string.isRequired, + rel_date: PropTypes.string.isRequired, + date: PropTypes.string.isRequired, + read: PropTypes.bool.isRequired, + selected: PropTypes.bool.isRequired, + liked: PropTypes.bool.isRequired, }, getInitialState: function() { return {read: this.props.read, liked: this.props.liked, @@ -86,7 +88,7 @@ var TableLine = React.createClass({ }, }); -var MiddlePanelSearchRow = React.createClass({ +var MiddlePanelSearchRow = createReactClass({ getInitialState: function() { return {query: MiddlePanelStore._datas.query, search_title: MiddlePanelStore._datas.search_title, @@ -143,7 +145,7 @@ var MiddlePanelSearchRow = React.createClass({ }, }); -var MiddlePanelFilter = React.createClass({ +var MiddlePanelFilter = createReactClass({ getInitialState: function() { return {filter: MiddlePanelStore._datas.filter, display_search: MiddlePanelStore._datas.display_search}; @@ -219,7 +221,7 @@ var MiddlePanelFilter = React.createClass({ }, }); -var MiddlePanel = React.createClass({ +var MiddlePanel = createReactClass({ getInitialState: function() { return {filter: MiddlePanelStore._datas.filter, articles: []}; }, |