Unverified Commit bfc4e8d1 authored by Prateek Jain's avatar Prateek Jain Committed by GitHub
Browse files

[IMPROVEMENT] Make links clickable on Room Info (#1730)


Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>
parent 5f8108d8
...@@ -21,6 +21,7 @@ import { themes } from '../../constants/colors'; ...@@ -21,6 +21,7 @@ import { themes } from '../../constants/colors';
import { withTheme } from '../../theme'; import { withTheme } from '../../theme';
import { themedHeader } from '../../utils/navigation'; import { themedHeader } from '../../utils/navigation';
import { getUserSelector } from '../../selectors/login'; import { getUserSelector } from '../../selectors/login';
import Markdown from '../../containers/markdown';
const PERMISSION_EDIT_ROOM = 'edit-room'; const PERMISSION_EDIT_ROOM = 'edit-room';
const camelize = str => str.replace(/^(.)/, (match, chr) => chr.toUpperCase()); const camelize = str => str.replace(/^(.)/, (match, chr) => chr.toUpperCase());
...@@ -172,12 +173,12 @@ class RoomInfoView extends React.Component { ...@@ -172,12 +173,12 @@ class RoomInfoView extends React.Component {
const { theme } = this.props; const { theme } = this.props;
return ( return (
<View style={styles.item}> <View style={styles.item}>
<Text style={[styles.itemLabel, { color: themes[theme].titleText }]}>{I18n.t(camelize(key))}</Text> <Text style={[styles.itemLabel, { color: themes[theme].auxiliaryText }]}>{I18n.t(camelize(key))}</Text>
<Text <Markdown
style={[styles.itemContent, !room[key] && styles.itemContent__empty, { color: themes[theme].auxiliaryText }]} useMarkdown
testID={`room-info-view-${ key }`} msg={room[key] ? room[key] : `__${ I18n.t(`No_${ key }_provided`) }__`}
>{ room[key] ? room[key] : I18n.t(`No_${ key }_provided`) } theme={theme}
</Text> />
</View> </View>
); );
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment