From 63ac91233ce8c122b8680368fc9d0069b913b6a1 Mon Sep 17 00:00:00 2001 From: Rushat Gabhane Date: Sun, 5 Jun 2022 20:51:30 +0300 Subject: [PATCH] fix propTypes --- .../BaseVideoChatButtonAndMenu.js | 16 +++++++++++++--- .../videoChatButtonAndMenuPropTypes.js | 8 -------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js b/src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js index f4fa0c7cad9..f605c781175 100755 --- a/src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js +++ b/src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js @@ -3,6 +3,7 @@ import React, {Component} from 'react'; import { View, Pressable, Dimensions, Linking, } from 'react-native'; +import PropTypes from 'prop-types'; import Icon from '../Icon'; import * as Expensicons from '../Icon/Expensicons'; import Popover from '../Popover'; @@ -12,13 +13,22 @@ import GoogleMeetIcon from '../../../assets/images/google-meet.svg'; import CONST from '../../CONST'; import styles from '../../styles/styles'; import themeColors from '../../styles/themes/default'; -import withWindowDimensions from '../withWindowDimensions'; -import withLocalize from '../withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions'; +import withLocalize, {withLocalizePropTypes} from '../withLocalize'; import compose from '../../libs/compose'; import Navigation from '../../libs/Navigation/Navigation'; import ROUTES from '../../ROUTES'; import Tooltip from '../Tooltip'; -import {propTypes, defaultProps} from './videoChatButtonAndMenuPropTypes'; +import {propTypes as videoChatButtonAndMenuPropTypes, defaultProps} from './videoChatButtonAndMenuPropTypes'; + +const propTypes = { + /** Link to open when user wants to create a new google meet meeting */ + googleMeetURL: PropTypes.string.isRequired, + + ...videoChatButtonAndMenuPropTypes, + ...withLocalizePropTypes, + ...windowDimensionsPropTypes, +}; class BaseVideoChatButtonAndMenu extends Component { constructor(props) { diff --git a/src/components/VideoChatButtonAndMenu/videoChatButtonAndMenuPropTypes.js b/src/components/VideoChatButtonAndMenu/videoChatButtonAndMenuPropTypes.js index de6b5cb5aae..fa06f7bfc44 100644 --- a/src/components/VideoChatButtonAndMenu/videoChatButtonAndMenuPropTypes.js +++ b/src/components/VideoChatButtonAndMenu/videoChatButtonAndMenuPropTypes.js @@ -1,16 +1,8 @@ import PropTypes from 'prop-types'; -import {windowDimensionsPropTypes} from '../withWindowDimensions'; -import {withLocalizePropTypes} from '../withLocalize'; const propTypes = { /** If this is the Concierge chat, we'll open the modal for requesting a setup call instead of showing popover menu */ isConcierge: PropTypes.bool, - - /** Link to open when user wants to create a new google meet meeting */ - googleMeetURL: PropTypes.string.isRequired, - - ...withLocalizePropTypes, - ...windowDimensionsPropTypes, }; const defaultProps = {