Skip to content

Commit

Permalink
fix: don't show transport component if the transport is unknown
Browse files Browse the repository at this point in the history
Signed-off-by: clegirar <clemntgirard@gmail.com>
  • Loading branch information
clegirar committed Jul 19, 2022
1 parent 39a69c5 commit eeeeb84
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@ export const MemberTransport: React.FC<IMemberStatus & IMemberTransports & IMemb
case beapi.messenger.StreamEvent.PeerStatusConnected.Transport.WAN:
icon = 'transport-4g'
break
case beapi.messenger.StreamEvent.PeerStatusConnected.Transport.Unknown:
icon = ''
break
}
}

return (
return icon ? (
<View style={[styles.container]}>
<Icon pack='custom' name={icon} width={iconSize} height={iconSize} fill={iconColor} />
</View>
)
) : null
}
const containerSize = 28
const styles = StyleSheet.create({
Expand Down

0 comments on commit eeeeb84

Please sign in to comment.