mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-17 10:47:48 +00:00
Contributing all buttons in one place goes against the designs that we set out at the beginning of the project's rewrite and that multiple of us have been following since then.
64 lines
1.3 KiB
JavaScript
64 lines
1.3 KiB
JavaScript
// @flow
|
|
|
|
import React, { Component } from 'react';
|
|
import { View } from 'react-native';
|
|
import { connect } from 'react-redux';
|
|
|
|
import { getLocalParticipant } from '../../../base/participants';
|
|
|
|
import styles from '../styles';
|
|
import Thumbnail from './Thumbnail';
|
|
|
|
type Props = {
|
|
|
|
/**
|
|
* The local participant.
|
|
*/
|
|
_localParticipant: Object
|
|
};
|
|
|
|
/**
|
|
* Component to render a local thumbnail that can be separated from the
|
|
* remote thumbnails later.
|
|
*/
|
|
class LocalThumbnail extends Component<Props> {
|
|
/**
|
|
* Implements React Component's render.
|
|
*
|
|
* @inheritdoc
|
|
*/
|
|
render() {
|
|
const { _localParticipant } = this.props;
|
|
|
|
return (
|
|
<View style = { styles.localThumbnail }>
|
|
<Thumbnail participant = { _localParticipant } />
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Maps (parts of) the redux state to the associated {@code LocalThumbnail}'s
|
|
* props.
|
|
*
|
|
* @param {Object} state - The redux state.
|
|
* @private
|
|
* @returns {{
|
|
* _localParticipant: Participant
|
|
* }}
|
|
*/
|
|
function _mapStateToProps(state) {
|
|
return {
|
|
/**
|
|
* The local participant.
|
|
*
|
|
* @private
|
|
* @type {Participant}
|
|
*/
|
|
_localParticipant: getLocalParticipant(state)
|
|
};
|
|
}
|
|
|
|
export default connect(_mapStateToProps)(LocalThumbnail);
|