Skip to content

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

feat(overlays): switch to flow Props

Saúl Ibarra Corretgé19702671f6a4
diff --git a/react/features/overlay/components/OverlayContainer.js b/react/features/overlay/components/OverlayContainer.js
index 31b2b58c6d..bb03330322 100644
--- a/react/features/overlay/components/OverlayContainer.js
+++ b/react/features/overlay/components/OverlayContainer.js
@@ -1,6 +1,5 @@
-/* global interfaceConfig */
+// @flow
-import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
@@ -14,6 +13,8 @@ import UserMediaPermissionsFilmstripOnlyOverlay
from './UserMediaPermissionsFilmstripOnlyOverlay';
import UserMediaPermissionsOverlay from './UserMediaPermissionsOverlay';
+declare var interfaceConfig: Object;
+
/**
* The lazily-initialized list of overlay React {@link Component} types used The
* user interface is filmstrip-only.
@@ -39,22 +40,23 @@ let _filmstripOnlyOverlays;
let _nonFilmstripOnlyOverlays;
/**
- * Implements a React {@link Component} that will display the correct overlay
- * when needed.
+ * OverlayContainer component's property types.
*/
-class OverlayContainer extends Component {
+type Props = {
+
/**
- * OverlayContainer component's property types.
- *
- * @static
+ * Type of overlay that should be rendered.
+ * XXX: We are using 'any' here because overlays are usually wrapped in
+ * functions, so a 'Node' won't do.
*/
- static propTypes = {
- /**
- * Type of overlay that should be rendered.
- */
- overlay: PropTypes.element
- };
+ overlay: any
+}
+/**
+ * Implements a React {@link Component} that will display the correct overlay
+ * when needed.
+ */
+class OverlayContainer extends Component<Props> {
/**
* Implements React's {@link Component#render()}.
*