2020-05-08 17:36:10 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import I18n from '../../i18n';
|
2022-03-03 21:46:53 +00:00
|
|
|
import { ISubscription } from '../../definitions';
|
2020-05-08 17:36:10 +00:00
|
|
|
import Item from './Item';
|
|
|
|
|
2023-09-26 14:33:53 +00:00
|
|
|
const Channel = ({ room }: { room?: ISubscription }): React.ReactElement => {
|
|
|
|
const description = room?.description || `__${I18n.t('No_label_provided', { label: 'description' })}__`;
|
|
|
|
const topic = room?.topic || `__${I18n.t('No_label_provided', { label: 'topic' })}__`;
|
|
|
|
const announcement = room?.announcement || `__${I18n.t('No_label_provided', { label: 'announcement' })}__`;
|
|
|
|
const broadcast = room?.broadcast ? I18n.t('Broadcast_hint') : '';
|
2020-05-08 17:36:10 +00:00
|
|
|
return (
|
|
|
|
<>
|
2023-09-26 14:33:53 +00:00
|
|
|
<Item label={I18n.t('Description')} content={description} testID='room-info-view-description' />
|
|
|
|
<Item label={I18n.t('Topic')} content={topic} testID='room-info-view-topic' />
|
|
|
|
<Item label={I18n.t('Announcement')} content={announcement} testID='room-info-view-announcement' />
|
|
|
|
<Item label={I18n.t('Broadcast')} content={broadcast} testID='room-info-view-broadcast' />
|
2020-05-08 17:36:10 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Channel;
|