Skip to content

Commit

Permalink
[PAY-1325] Remove userbadges from chat unavailable message in chat sc…
Browse files Browse the repository at this point in the history
…reen (#3567)
  • Loading branch information
dharit-tan authored Jun 12, 2023
1 parent da10bbc commit 0355c10
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions packages/mobile/src/screens/chat-screen/ChatUnavailable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { ChatPermissionAction, useCanSendMessage } from '@audius/common'
import { View, Text } from 'react-native'
import { useDispatch } from 'react-redux'

import { UserBadges } from 'app/components/user-badges'
import { useNavigation } from 'app/hooks/useNavigation'
import { setVisibility } from 'app/store/drawers/slice'
import { makeStyles } from 'app/styles'

const messages = {
noAction: 'You can no longer send messages to ',
noAction: (userName: string) =>
`You can no longer send messages to ${userName}. `,
tip1: 'You must send ',
tip2: ' a tip before you can send them messages.',
blockee: 'You cannot send messages to users you have blocked. ',
Expand Down Expand Up @@ -68,12 +68,7 @@ export const ChatUnavailable = ({ chatId }: ChatUnavailableProps) => {
[ChatPermissionAction.NONE]: () => (
<>
<Text style={styles.unavailableText}>
{messages.noAction}
<UserBadges
user={otherUser}
as={Text}
nameStyle={styles.unavailableText}
/>{' '}
{messages.noAction(otherUser.name)}
<Text
style={[styles.unavailableText, styles.link]}
onPress={handleLearnMorePress}
Expand All @@ -92,11 +87,7 @@ export const ChatUnavailable = ({ chatId }: ChatUnavailableProps) => {
navigation.navigate('Profile', { id: otherUser.user_id })
}
>
<UserBadges
user={otherUser}
as={Text}
nameStyle={[styles.unavailableText, styles.link]}
/>
{otherUser.name}
</Text>
{messages.tip2}
</Text>
Expand Down

0 comments on commit 0355c10

Please sign in to comment.