Enable profile photo touch
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Avatar } from 'react-native-paper';
|
||||
import { View, StyleSheet, Text } from 'react-native';
|
||||
import { View, StyleSheet, Text, TouchableOpacity } from 'react-native';
|
||||
import API from './../API.js';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { Image } from 'expo-image'; // Import Image from expo-image
|
||||
@@ -29,13 +29,17 @@ const ProfileHeader = ({ profileid, withName = false, small = false }) => {
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<Image source={{ uri: photoUrl }} key={photoUrl}
|
||||
style={{
|
||||
width: small ? 25 : 35,
|
||||
height: small ? 25 : 35,
|
||||
aspectRatio: 1,
|
||||
borderRadius: 50,
|
||||
}} cachePolicy="memory-disk"/>
|
||||
style={{
|
||||
width: small ? 25 : 35,
|
||||
height: small ? 25 : 35,
|
||||
aspectRatio: 1,
|
||||
borderRadius: 50,
|
||||
}} cachePolicy="memory-disk"
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
|
||||
<View style={styles.textContainer}>
|
||||
<Text style={small ? styles.smallProfileName : styles.profileName} onPress={onPress}>{fullName}</Text>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user