diff --git a/native/chat/relationship-prompt.react.js b/native/chat/relationship-prompt.react.js --- a/native/chat/relationship-prompt.react.js +++ b/native/chat/relationship-prompt.react.js @@ -1,15 +1,14 @@ // @flow -import Icon from '@expo/vector-icons/FontAwesome5.js'; import * as React from 'react'; -import { Text, View } from 'react-native'; +import { View } from 'react-native'; import { useRelationshipPrompt } from 'lib/hooks/relationship-prompt.js'; import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import { userRelationshipStatus } from 'lib/types/relationship-types.js'; import type { UserInfo } from 'lib/types/user-types.js'; -import Button from '../components/button.react.js'; +import RelationshipButton from '../components/relationship-button.react.js'; import { useStyles } from '../themes/colors.js'; import { unknownErrorAlertDetails } from '../utils/alert-messages.js'; import Alert from '../utils/alert.js'; @@ -34,6 +33,12 @@ const { otherUserInfo, callbacks: { blockUser, unblockUser, friendUser, unfriendUser }, + loaders: { + isLoadingBlockUser, + isLoadingUnblockUser, + isLoadingFriendUser, + isLoadingUnfriendUser, + }, } = useRelationshipPrompt( threadInfo, onErrorCallback, @@ -54,10 +59,14 @@ ) { return ( - + + + ); } @@ -70,13 +79,14 @@ ) { return ( - + + + ); } @@ -87,20 +97,22 @@ ) { return ( - - + + + + + + ); } @@ -110,30 +122,36 @@ ) { return ( - + + + ); } return ( - - + + + + + + ); }, @@ -146,27 +164,11 @@ backgroundColor: 'panelBackground', flexDirection: 'row', }, - button: { - padding: 10, - borderRadius: 5, + buttonContainer: { flex: 1, - flexDirection: 'row', - justifyContent: 'center', + height: 32, marginHorizontal: 5, }, - greenButton: { - backgroundColor: 'vibrantGreenButton', - }, - redButton: { - backgroundColor: 'vibrantRedButton', - }, - buttonText: { - fontSize: 11, - color: 'white', - fontWeight: 'bold', - textAlign: 'center', - marginLeft: 5, - }, }; export default RelationshipPrompt;