From d188fdb9fea056db32eeea499ec983c669110381 Mon Sep 17 00:00:00 2001 From: Vicky Koblinski Date: Thu, 26 Oct 2017 21:23:16 -0400 Subject: [PATCH] Changes requires to imports for consistancy, removes 'use strict' --- .../views/settings/Notifications.js | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 3c01742171..afc465d484 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -14,16 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; -const React = require('react'); -import { _t, _tJsx } from 'matrix-react-sdk/lib/languageHandler'; +import React from 'react'; import Promise from 'bluebird'; -const sdk = require('matrix-react-sdk'); -const MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); -const UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore'); -const Modal = require('matrix-react-sdk/lib/Modal'); - -const notifications = require('../../../notifications'); +import sdk from 'matrix-react-sdk'; +import { _t, _tJsx } from 'matrix-react-sdk/lib/languageHandler'; +import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; +import UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; +import Modal from 'matrix-react-sdk/lib/Modal'; +import { + NotificationUtils, + VectorPushRulesDefinitions, + PushRuleVectorState, + ContentRules +} from '../../../notifications'; // TODO: this "view" component still has far too much application logic in it, // which should be factored out to other files. @@ -31,10 +34,6 @@ const notifications = require('../../../notifications'); // TODO: this component also does a lot of direct poking into this.state, which // is VERY NAUGHTY. -const NotificationUtils = notifications.NotificationUtils; -const VectorPushRulesDefinitions = notifications.VectorPushRulesDefinitions; -const PushRuleVectorState = notifications.PushRuleVectorState; -const ContentRules = notifications.ContentRules; /** * Rules that Vector used to set in order to override the actions of default rules.