From debc124714db0e9d9293b8384d385c6dd44aa8f0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 5 Aug 2019 10:08:07 +0100 Subject: [PATCH] Use the documented syntax for default props in CreateReactClass Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/ConfirmUserActionDialog.js | 4 ++-- src/components/views/rooms/AppsDrawer.js | 4 ++-- src/components/views/rooms/AuxPanel.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/views/dialogs/ConfirmUserActionDialog.js b/src/components/views/dialogs/ConfirmUserActionDialog.js index b65d98d78d..4848e468e9 100644 --- a/src/components/views/dialogs/ConfirmUserActionDialog.js +++ b/src/components/views/dialogs/ConfirmUserActionDialog.js @@ -49,10 +49,10 @@ export default React.createClass({ onFinished: PropTypes.func.isRequired, }, - defaultProps: { + getDefaultProps: () => ({ danger: false, askReason: false, - }, + }), componentWillMount: function() { this._reasonField = null; diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index 2976925594..2e9d3e5071 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -44,10 +44,10 @@ module.exports = React.createClass({ hide: PropTypes.bool, // If rendered, should apps drawer be visible }, - defaultProps: { + getDefaultProps: () => ({ showApps: true, hide: false, - }, + }), getInitialState: function() { return { diff --git a/src/components/views/rooms/AuxPanel.js b/src/components/views/rooms/AuxPanel.js index 3c2cf870b8..6cbec30c4d 100644 --- a/src/components/views/rooms/AuxPanel.js +++ b/src/components/views/rooms/AuxPanel.js @@ -57,10 +57,10 @@ module.exports = React.createClass({ fullHeight: PropTypes.bool, }, - defaultProps: { + getDefaultProps: () => ({ showApps: true, hideAppsDrawer: false, - }, + }), getInitialState: function() { return { counters: this._computeCounters() };