Skip to content

Commit

Permalink
Fix: show tip in user profile (#235)
Browse files Browse the repository at this point in the history
* show tip in user profile

* tip profile

---------

Co-authored-by: Uğur Eren <contact@ugureren.net>
  • Loading branch information
MSghais and ugur-eren authored Jul 23, 2024
1 parent bcf4927 commit 0dc954e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 0 additions & 4 deletions JoyboyCommunity/src/modules/TipModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ export const TipModal = forwardRef<Modalize, TipModalProps>(
)}
</View>
</View>

<View style={styles.likes}>
<Text fontSize={11}>16 likes</Text>
</View>
</View>

<Text
Expand Down
7 changes: 6 additions & 1 deletion JoyboyCommunity/src/screens/Profile/Info/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Pressable, View} from 'react-native';
import {UserPlusIcon} from '../../../assets/icons';
import {Button, IconButton, Menu, Text} from '../../../components';
import {useContacts, useEditContacts, useProfile, useStyles, useTheme} from '../../../hooks';
import {useToast} from '../../../hooks/modals';
import {useTipModal, useToast} from '../../../hooks/modals';
import {useAuth} from '../../../store/auth';
import {ProfileScreenProps} from '../../../types';
import {ProfileHead} from '../Head';
Expand All @@ -32,6 +32,7 @@ export const ProfileInfo: React.FC<ProfileInfoProps> = ({publicKey: userPublicKe
const userContacts = useContacts({authors: [userPublicKey]});
const contacts = useContacts({authors: [publicKey]});
const editContacts = useEditContacts();
const {show: showTipModal} = useTipModal();

const isSelf = publicKey === userPublicKey;
const isConnected = contacts.data?.includes(userPublicKey);
Expand Down Expand Up @@ -124,6 +125,10 @@ export const ProfileInfo: React.FC<ProfileInfoProps> = ({publicKey: userPublicKe
<Menu.Item
label={profile?.username ? `Tip @${profile.username}` : 'Tip'}
icon="CoinIcon"
onPress={() => {
showTipModal({pubkey: userPublicKey} as any);
setMenuOpen(false);
}}
/>
<Menu.Item
label={profile?.username ? `Share @${profile.username}` : 'Share'}
Expand Down

0 comments on commit 0dc954e

Please sign in to comment.