diff --git a/src/Modal.js b/src/Modal.js index 7be37da92e..38bcfad448 100644 --- a/src/Modal.js +++ b/src/Modal.js @@ -19,6 +19,7 @@ limitations under the License. var React = require('react'); var ReactDOM = require('react-dom'); +import Analytics from './Analytics'; import sdk from './index'; const DIALOG_CONTAINER_ID = "mx_Dialog_Container"; @@ -104,6 +105,7 @@ class ModalManager { } createDialog(Element, props, className) { + Analytics.trackEvent('Modal', props.title, 'createDialog'); return this.createDialogAsync((cb) => {cb(Element);}, props, className); } diff --git a/src/components/views/dialogs/BaseDialog.js b/src/components/views/dialogs/BaseDialog.js index f2ea4eda95..295bb21ea1 100644 --- a/src/components/views/dialogs/BaseDialog.js +++ b/src/components/views/dialogs/BaseDialog.js @@ -16,7 +16,6 @@ limitations under the License. import React from 'react'; -import Analytics from '../../../Analytics'; import * as KeyCode from '../../../KeyCode'; import AccessibleButton from '../elements/AccessibleButton'; import sdk from '../../../index'; @@ -67,7 +66,6 @@ export default React.createClass({ }, render: function() { - Analytics.trackEvent('Dialog', this.props.title, 'mount'); const TintableSvg = sdk.getComponent("elements.TintableSvg"); return ( diff --git a/src/components/views/dialogs/ChatInviteDialog.js b/src/components/views/dialogs/ChatInviteDialog.js index ca0f10bc6b..6f2bbbba82 100644 --- a/src/components/views/dialogs/ChatInviteDialog.js +++ b/src/components/views/dialogs/ChatInviteDialog.js @@ -34,7 +34,7 @@ const TRUNCATE_QUERY_LIST = 40; module.exports = React.createClass({ displayName: "ChatInviteDialog", propTypes: { - title: React.PropTypes.string, + title: React.PropTypes.string.isRequired, description: React.PropTypes.oneOfType([ React.PropTypes.element, React.PropTypes.string,