import React from 'react'; import { StyleProp, Text, View, ViewStyle } from 'react-native'; import { useSelector } from 'react-redux'; import { getConferenceName } from '../../../../base/conference/functions'; import { getFeatureFlag, MEETING_NAME_ENABLED } from '../../../../base/flags'; import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet'; import { getLocalParticipant } from '../../../../base/participants'; import { connect } from '../../../../base/redux'; import ConnectionIndicator from '../../../../connection-indicator/components/native/ConnectionIndicator'; import RecordingLabel from '../../../../recording/components/native/RecordingLabel'; import { VideoQualityLabel } from '../../../../video-quality'; import styles from './styles'; type Props = { /** * Name of the meeting we're currently in. */ _meetingName: string, /** * Whether displaying the current meeting name is enabled or not. */ _meetingNameEnabled: boolean, }; /** * Implements a navigation bar component that is rendered on top of the * carmode screen. * * @param {Props} props - The React props passed to this component. * @returns {JSX.Element} */ const TitleBar = (props: Props) : JSX.Element => { const localParticipant = useSelector(getLocalParticipant); const localParticipantId = localParticipant?.id; return (<> }> }> }> }> { props._meetingNameEnabled && }> {props._meetingName} } ); }; /** * Maps part of the Redux store to the props of this component. * * @param {Object} state - The Redux state. * @returns {Props} */ function _mapStateToProps(state: Object) { const { hideConferenceSubject } = state['features/base/config']; return { _meetingName: getConferenceName(state), _meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true) && !hideConferenceSubject }; } export default connect(_mapStateToProps)(TitleBar);