2018-11-23 22:14:48 +08:00
|
|
|
import React, { PureComponent } from 'react';
|
2017-06-04 10:40:14 +08:00
|
|
|
import PropTypes from 'prop-types';
|
2017-09-26 07:45:44 +08:00
|
|
|
import injectWbResizeEvent from '/imports/ui/components/presentation/resize-wrapper/component';
|
2021-10-20 22:17:16 +08:00
|
|
|
import Styled from './styles';
|
2018-03-21 03:35:28 +08:00
|
|
|
import CustomLogo from './custom-logo/component';
|
2018-10-24 22:17:13 +08:00
|
|
|
import UserContentContainer from './user-list-content/container';
|
2016-05-20 02:22:56 +08:00
|
|
|
|
2016-06-29 03:52:03 +08:00
|
|
|
const propTypes = {
|
2017-07-28 21:43:39 +08:00
|
|
|
compact: PropTypes.bool,
|
2024-05-03 20:31:18 +08:00
|
|
|
CustomLogoUrl: PropTypes.string,
|
2018-09-14 02:09:30 +08:00
|
|
|
showBranding: PropTypes.bool.isRequired,
|
2016-06-29 03:52:03 +08:00
|
|
|
};
|
2018-09-14 02:09:30 +08:00
|
|
|
|
2016-06-29 03:52:03 +08:00
|
|
|
const defaultProps = {
|
2017-07-28 21:43:39 +08:00
|
|
|
compact: false,
|
2024-05-03 20:31:18 +08:00
|
|
|
CustomLogoUrl: null,
|
2016-06-29 03:52:03 +08:00
|
|
|
};
|
|
|
|
|
2018-11-23 22:14:48 +08:00
|
|
|
class UserList extends PureComponent {
|
2017-07-28 21:43:39 +08:00
|
|
|
render() {
|
2018-03-21 03:35:28 +08:00
|
|
|
const {
|
|
|
|
compact,
|
|
|
|
CustomLogoUrl,
|
2018-09-14 02:09:30 +08:00
|
|
|
showBranding,
|
2018-03-21 03:35:28 +08:00
|
|
|
} = this.props;
|
|
|
|
|
2017-07-28 21:43:39 +08:00
|
|
|
return (
|
2021-10-20 22:17:16 +08:00
|
|
|
<Styled.UserList>
|
2018-03-21 03:35:28 +08:00
|
|
|
{
|
2018-09-14 02:09:30 +08:00
|
|
|
showBranding
|
2019-01-14 21:23:35 +08:00
|
|
|
&& !compact
|
|
|
|
&& CustomLogoUrl
|
|
|
|
? <CustomLogo CustomLogoUrl={CustomLogoUrl} /> : null
|
2018-03-21 03:35:28 +08:00
|
|
|
}
|
2021-12-07 00:32:41 +08:00
|
|
|
<UserContentContainer compact={compact} />
|
2021-10-20 22:17:16 +08:00
|
|
|
</Styled.UserList>
|
2017-07-28 21:43:39 +08:00
|
|
|
);
|
|
|
|
}
|
2016-05-20 02:22:56 +08:00
|
|
|
}
|
2016-06-02 21:00:57 +08:00
|
|
|
|
2016-06-29 03:52:03 +08:00
|
|
|
UserList.propTypes = propTypes;
|
2017-07-28 21:43:39 +08:00
|
|
|
UserList.defaultProps = defaultProps;
|
|
|
|
|
2021-12-07 00:32:41 +08:00
|
|
|
export default injectWbResizeEvent(UserList);
|