diff --git a/client-reactnative/src/Screens/Chat/NewChatScreen.tsx b/client-reactnative/src/Screens/Chat/NewChatScreen.tsx index 7baeeb37..7cad4d48 100644 --- a/client-reactnative/src/Screens/Chat/NewChatScreen.tsx +++ b/client-reactnative/src/Screens/Chat/NewChatScreen.tsx @@ -125,13 +125,12 @@ const NewChatScreen = (props: NewChatScreenProps) => { { roomName: chatName, roomDescription: chatDescription }, chatStore.xmpp ); - chatAvatar && setRoomImage( manipulatedWalletAddress + "@" + apiStore.xmppDomains.DOMAIN, roomHash + apiStore.xmppDomains.CONFERENCEDOMAIN, chatAvatar, - "", + "none", "icon", chatStore.xmpp ); diff --git a/client-reactnative/src/components/Profile/ProfileTabs.tsx b/client-reactnative/src/components/Profile/ProfileTabs.tsx index 31ef4063..f8b590a4 100644 --- a/client-reactnative/src/components/Profile/ProfileTabs.tsx +++ b/client-reactnative/src/components/Profile/ProfileTabs.tsx @@ -1,26 +1,26 @@ -import {useNavigation} from '@react-navigation/native'; -import {HStack, VStack} from 'native-base'; -import React, {useState} from 'react'; -import {FlatList, Image, StyleSheet, Text, View} from 'react-native'; +import { useNavigation } from "@react-navigation/native"; +import { HStack, VStack } from "native-base"; +import React, { useState } from "react"; +import { FlatList, Image, StyleSheet, Text, View } from "react-native"; import { coinImagePath, coinReplacedName, commonColors, itemsTransfersAllowed, textStyles, -} from '../../../docs/config'; -import {IDocument, TBalance} from '../../stores/types'; -import {NftListItem} from '../Transactions/NftListItem'; -import {DocumentListItem} from './DocumentListItem'; -import {ProfileTab} from './ProfileTab'; +} from "../../../docs/config"; +import { IDocument, TBalance } from "../../stores/types"; +import { NftListItem } from "../Transactions/NftListItem"; +import { DocumentListItem } from "./DocumentListItem"; +import { ProfileTab } from "./ProfileTab"; import { widthPercentageToDP as wp, heightPercentageToDP as hp, -} from 'react-native-responsive-screen'; -import {NftMediaModal} from '../NftMediaModal'; -import {HomeStackNavigationProp} from '../../navigation/types'; +} from "react-native-responsive-screen"; +import { NftMediaModal } from "../NftMediaModal"; +import { HomeStackNavigationProp } from "../../navigation/types"; -const renderItem = ({item, index}: {item: any; index: number}) => ( +const renderItem = ({ item, index }: { item: any; index: number }) => ( ( - + justifyContent={"space-between"} + alignItems={"center"} + width={"full"} + > + {/* {tokenSymbol} */} - + {coinReplacedName} - + {parseFloat(balance).toFixed(0)} @@ -109,14 +110,14 @@ export const ProfileTabs: React.FC = ({ const [mediaModalData, setMediaModalData] = useState({ open: false, - url: '', - mimetype: '', + url: "", + mimetype: "", }); return ( - - - {itemsTransfersAllowed && ( + + + {itemsTransfersAllowed && !!nftItems.length && ( setActiveAssetTab(1)} @@ -143,7 +144,7 @@ export const ProfileTabs: React.FC = ({ )} - + {activeAssetTab === 1 && nftItems.length === 0 && documents.length === 0 && ( @@ -154,14 +155,14 @@ export const ProfileTabs: React.FC = ({ keyExtractor={(item, index) => index.toString()} /> )} - {activeAssetTab === 1 && ( + {activeAssetTab === 1 && !!nftItems.length && ( ( + renderItem={(e) => ( - navigation.navigate('NftItemHistory', { + navigation.navigate("NftItemHistory", { item: e.item, userWalletAddress: userWalletAddress, }) @@ -182,11 +183,11 @@ export const ProfileTabs: React.FC = ({ {activeAssetTab === 2 && ( ( + renderItem={(e) => ( - navigation.navigate('NftItemHistory', { + navigation.navigate("NftItemHistory", { item: e.item, userWalletAddress: userWalletAddress, }) @@ -207,7 +208,7 @@ export const ProfileTabs: React.FC = ({ {activeAssetTab === 3 && ( ( + renderItem={(e) => ( @@ -218,7 +219,7 @@ export const ProfileTabs: React.FC = ({ }) } onItemPress={() => { - navigation.navigate('DocumentHistoryScreen', { + navigation.navigate("DocumentHistoryScreen", { item: e.item, userWalletAddress: userWalletAddress, }); @@ -232,7 +233,9 @@ export const ProfileTabs: React.FC = ({ setMediaModalData(prev => ({...prev, open: false}))} + closeModal={() => + setMediaModalData((prev) => ({ ...prev, open: false })) + } url={mediaModalData.url} mimetype={mediaModalData.mimetype} /> @@ -242,8 +245,8 @@ export const ProfileTabs: React.FC = ({ const styles = StyleSheet.create({ tokenIconStyle: { - height: hp('3%'), - width: hp('3%'), + height: hp("3%"), + width: hp("3%"), }, mainContainerStyle: { @@ -251,12 +254,12 @@ const styles = StyleSheet.create({ flex: 1, }, tabText: { - fontSize: hp('1.97%'), + fontSize: hp("1.97%"), fontFamily: textStyles.boldFont, }, coinsItemText: { fontFamily: textStyles.mediumFont, - fontSize: hp('1.97%'), - color: '#000000', + fontSize: hp("1.97%"), + color: "#000000", }, }); diff --git a/client-reactnative/src/components/Transactions/TransactionsListItem.tsx b/client-reactnative/src/components/Transactions/TransactionsListItem.tsx index 69402492..bdc7c0eb 100644 --- a/client-reactnative/src/components/Transactions/TransactionsListItem.tsx +++ b/client-reactnative/src/components/Transactions/TransactionsListItem.tsx @@ -80,7 +80,7 @@ export const TransactionsListItem = (props: TransactionListProps) => { - {truncateString(name, 1)} + {truncateString(name, 15)} diff --git a/client-reactnative/src/stores/walletStore.ts b/client-reactnative/src/stores/walletStore.ts index dde060e5..80f6ae2f 100644 --- a/client-reactnative/src/stores/walletStore.ts +++ b/client-reactnative/src/stores/walletStore.ts @@ -562,10 +562,7 @@ export class WalletStore { runInAction(() => { this.offset = this.offset + response.data.limit; this.total = response.data.total; - this.anotherUserTransaction = [ - ...this.anotherUserTransaction, - ...response.data.items, - ].map((item) => mapTransactions(item, walletAddress)); + this.anotherUserTransaction = response.data.items.map((item) => mapTransactions(item, walletAddress)); }); } } catch (error) {