diff --git a/native/components/community-pill.react.js b/native/components/community-pill.react.js index bdd64778d..cd1913780 100644 --- a/native/components/community-pill.react.js +++ b/native/components/community-pill.react.js @@ -1,73 +1,73 @@ // @flow import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import { memberHasAdminPowers } from 'lib/shared/thread-utils'; import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types'; import { useSelector } from '../redux/redux-utils'; import { useColors } from '../themes/colors'; +import CommIcon from './comm-icon.react'; import Pill from './pill.react'; -import SWMansionIcon from './swmansion-icon.react'; import ThreadPill from './thread-pill.react'; type Props = { +community: ThreadInfo, }; function CommunityPill(props: Props): React.Node { const { community } = props; const userInfos = useSelector(state => state.userStore.userInfos); const keyserverOperatorUsername: ?string = React.useMemo(() => { for (const member: RelativeMemberInfo of community.members) { if (memberHasAdminPowers(member)) { return userInfos[member.id].username; } } }, [community, userInfos]); const colors = useColors(); const keyserverOperatorLabel: ?React.Node = React.useMemo(() => { if (!keyserverOperatorUsername) { return undefined; } const icon = ( - ); return ( ); }, [ colors.codeBackground, colors.panelForegroundLabel, keyserverOperatorUsername, ]); return ( {keyserverOperatorLabel} ); } const styles = StyleSheet.create({ container: { flexDirection: 'row', }, }); export default CommunityPill;