Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Moves feedback button as a component.

damencho0765c60d77a4
diff --git a/react/features/conference/components/Conference.web.js b/react/features/conference/components/Conference.web.js
index e83c87c176..1feece33d8 100644
--- a/react/features/conference/components/Conference.web.js
+++ b/react/features/conference/components/Conference.web.js
@@ -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'>
diff --git a/react/features/feedback/components/FeedbackButton.web.js b/react/features/feedback/components/FeedbackButton.web.js
new file mode 100644
index 0000000000..0970b797e4
--- /dev/null
+++ b/react/features/feedback/components/FeedbackButton.web.js
@@ -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' />
+ );
+ }
+}
diff --git a/react/features/feedback/components/index.js b/react/features/feedback/components/index.js
new file mode 100644
index 0000000000..a6c21d87fd
--- /dev/null
+++ b/react/features/feedback/components/index.js
@@ -0,0 +1 @@
+export * from './FeedbackButton';
diff --git a/react/features/feedback/index.js b/react/features/feedback/index.js
new file mode 100644
index 0000000000..07635cbbc8
--- /dev/null
+++ b/react/features/feedback/index.js
@@ -0,0 +1 @@
+export * from './components';