move Dialog analytics to Modal controller
mark title as required, it sorta is, why isn't this based on BaseDialog? Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
c2dca0c805
commit
b65e4960a5
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue