Moves feedback button as a component.

When callstats is not configured hide the button.
This commit is contained in:
damencho 2017-01-31 16:38:34 -06:00 committed by Lyubomir Marinov
parent 7fa17322a1
commit 0765c60d77
4 changed files with 34 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import { connect as reactReduxConnect } from 'react-redux';
import { connect, disconnect } from '../../base/connection';
import { Watermarks } from '../../base/react';
import { FeedbackButton } from '../../feedback';
/**
* For legacy reasons, inline style for display none.
@ -83,9 +84,9 @@ class Conference extends Component {
className = 'toolbar'
id = 'extendedToolbar'>
<div id = 'extendedToolbarButtons' />
<a
className = 'button icon-feedback'
id = 'feedbackButton' />
<FeedbackButton />
<div id = 'sideToolbarContainer' />
</div>
<div id = 'videospace'>

View File

@ -0,0 +1,28 @@
/* global config */
import React, { Component } from 'react';
/**
* A Web Component which renders feedback button.
*/
export class FeedbackButton extends Component {
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
// if there is no callstats configured skip rendering
if (!config.callStatsID) {
return null;
}
return (
<a
className = 'button icon-feedback'
id = 'feedbackButton' />
);
}
}

View File

@ -0,0 +1 @@
export * from './FeedbackButton';

View File

@ -0,0 +1 @@
export * from './components';