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