Skip to content

Commit 99b2b85

Browse files
authored
Merge pull request #9315 from rushatgabhane/fix-console-error
Fix console error caused by incorrect propTypes
2 parents 50da22f + 63ac912 commit 99b2b85

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React, {Component} from 'react';
33
import {
44
View, Pressable, Dimensions, Linking,
55
} from 'react-native';
6+
import PropTypes from 'prop-types';
67
import Icon from '../Icon';
78
import * as Expensicons from '../Icon/Expensicons';
89
import Popover from '../Popover';
@@ -12,13 +13,22 @@ import GoogleMeetIcon from '../../../assets/images/google-meet.svg';
1213
import CONST from '../../CONST';
1314
import styles from '../../styles/styles';
1415
import themeColors from '../../styles/themes/default';
15-
import withWindowDimensions from '../withWindowDimensions';
16-
import withLocalize from '../withLocalize';
16+
import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions';
17+
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
1718
import compose from '../../libs/compose';
1819
import Navigation from '../../libs/Navigation/Navigation';
1920
import ROUTES from '../../ROUTES';
2021
import Tooltip from '../Tooltip';
21-
import {propTypes, defaultProps} from './videoChatButtonAndMenuPropTypes';
22+
import {propTypes as videoChatButtonAndMenuPropTypes, defaultProps} from './videoChatButtonAndMenuPropTypes';
23+
24+
const propTypes = {
25+
/** Link to open when user wants to create a new google meet meeting */
26+
googleMeetURL: PropTypes.string.isRequired,
27+
28+
...videoChatButtonAndMenuPropTypes,
29+
...withLocalizePropTypes,
30+
...windowDimensionsPropTypes,
31+
};
2232

2333
class BaseVideoChatButtonAndMenu extends Component {
2434
constructor(props) {

src/components/VideoChatButtonAndMenu/videoChatButtonAndMenuPropTypes.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
import PropTypes from 'prop-types';
2-
import {windowDimensionsPropTypes} from '../withWindowDimensions';
3-
import {withLocalizePropTypes} from '../withLocalize';
42

53
const propTypes = {
64
/** If this is the Concierge chat, we'll open the modal for requesting a setup call instead of showing popover menu */
75
isConcierge: PropTypes.bool,
8-
9-
/** Link to open when user wants to create a new google meet meeting */
10-
googleMeetURL: PropTypes.string.isRequired,
11-
12-
...withLocalizePropTypes,
13-
...windowDimensionsPropTypes,
146
};
157

168
const defaultProps = {

0 commit comments

Comments
 (0)