add prop validation
This commit is contained in:
parent
61de88d8d0
commit
9606b5aa10
@ -5,7 +5,6 @@ import { withRouter } from 'react-router';
|
||||
|
||||
import injectWbResizeEvent from '/imports/ui/components/presentation/resize-wrapper/component';
|
||||
import styles from './styles';
|
||||
import UserListHeader from './user-list-header/component';
|
||||
import UserContent from './user-list-content/component';
|
||||
|
||||
const propTypes = {
|
||||
@ -27,6 +26,7 @@ const propTypes = {
|
||||
kickUser: PropTypes.func.isRequired,
|
||||
toggleVoice: PropTypes.func.isRequired,
|
||||
changeRole: PropTypes.func.isRequired,
|
||||
roving: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
|
@ -1,10 +1,36 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { createContainer } from 'meteor/react-meteor-data';
|
||||
import { meetingIsBreakout } from '/imports/ui/components/app/service';
|
||||
import Meetings from '/imports/api/meetings';
|
||||
import Service from './service';
|
||||
import UserList from './component';
|
||||
|
||||
const propTypes = {
|
||||
openChats: PropTypes.arrayOf(String).isRequired,
|
||||
openChat: PropTypes.string.isRequired,
|
||||
users: PropTypes.arrayOf(Object).isRequired,
|
||||
currentUser: PropTypes.shape({}).isRequired,
|
||||
meeting: PropTypes.shape({}).isRequired,
|
||||
isBreakoutRoom: PropTypes.bool.isRequired,
|
||||
getAvailableActions: PropTypes.func.isRequired,
|
||||
normalizeEmojiName: PropTypes.func.isRequired,
|
||||
isMeetingLocked: PropTypes.func.isRequired,
|
||||
isPublicChat: PropTypes.func.isRequired,
|
||||
setEmojiStatus: PropTypes.func.isRequired,
|
||||
assignPresenter: PropTypes.func.isRequired,
|
||||
kickUser: PropTypes.func.isRequired,
|
||||
toggleVoice: PropTypes.func.isRequired,
|
||||
changeRole: PropTypes.func.isRequired,
|
||||
roving: PropTypes.func.isRequired,
|
||||
userActions: PropTypes.func.isRequired,
|
||||
children: PropTypes.Object,
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
children: {},
|
||||
};
|
||||
|
||||
const UserListContainer = (props) => {
|
||||
const {
|
||||
users,
|
||||
@ -52,6 +78,9 @@ const UserListContainer = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
UserListContainer.propTypes = propTypes;
|
||||
UserListContainer.defaultProps = defaultProps;
|
||||
|
||||
export default createContainer(({ params }) => ({
|
||||
users: Service.getUsers(),
|
||||
meeting: Meetings.findOne({}),
|
||||
|
Loading…
Reference in New Issue
Block a user