Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

DMs: Ensure every permission action has a CTA #3716

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/mobile/src/screens/chat-screen/ChatUserListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,13 @@ const useStyles = makeStyles(({ spacing, palette, typography }) => ({
}
}))

const ctaToTextMap = {
const ctaToTextMap: Record<ChatPermissionAction, string> = {
[ChatPermissionAction.TIP]: messages.ctaTip,
[ChatPermissionAction.UNBLOCK]: messages.ctaBlock,
[ChatPermissionAction.NONE]: messages.ctaNone
[ChatPermissionAction.NONE]: messages.ctaNone,
[ChatPermissionAction.WAIT]: messages.ctaNone,
[ChatPermissionAction.NOT_APPLICABLE]: messages.ctaNone,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will never show up because we check canMessage but just covering all bases here.

[ChatPermissionAction.SIGN_UP]: messages.ctaNone
}

type ChatUserListItemProps = {
Expand Down