diff --git a/native/components/thread-visibility.react.js b/native/components/thread-visibility.react.js index b4e55e689..56d365527 100644 --- a/native/components/thread-visibility.react.js +++ b/native/components/thread-visibility.react.js @@ -1,52 +1,47 @@ // @flow import * as React from 'react'; import { View, Text, StyleSheet } from 'react-native'; -import Icon from 'react-native-vector-icons/MaterialIcons'; import { threadTypes, type ThreadType } from 'lib/types/thread-types'; +import ThreadIcon from './thread-icon.react'; + type Props = {| +threadType: ThreadType, +color: string, |}; function ThreadVisibility(props: Props) { const { threadType, color } = props; const visLabelStyle = [styles.visibilityLabel, { color }]; + + let label; if (threadType === threadTypes.CHAT_SECRET) { - return ( - - - Secret - - ); + label = 'Secret'; } else if (threadType === threadTypes.PRIVATE) { - return ( - - - Private - - ); + label = 'Private'; } else { - return ( - - - Open - - ); + label = 'Open'; } + + return ( + + + {label} + + ); } const styles = StyleSheet.create({ container: { alignItems: 'center', flexDirection: 'row', }, visibilityLabel: { fontSize: 16, fontWeight: 'bold', paddingLeft: 4, }, }); export default ThreadVisibility;