Fixed image not displaying. I think we may have most of the homepage working now!
This commit is contained in:
parent
7fbaad97a1
commit
c0c6ad5af4
@ -150,7 +150,7 @@ const RelationshipView: React.FC<RelationshipProps> = ({ pfpUrl }) => {
|
||||
<ThemedView style={styles.profileWrapper}>
|
||||
<Image
|
||||
source={{
|
||||
uri: `${process.env.EXPO_PUBLIC_URL}` +
|
||||
uri: `${process.env.EXPO_PUBLIC_API_URL}` +
|
||||
`${status.partner.pfpUrl}`
|
||||
}}
|
||||
style={styles.profilePicture}
|
||||
@ -185,7 +185,7 @@ const RelationshipView: React.FC<RelationshipProps> = ({ pfpUrl }) => {
|
||||
<ThemedView style={styles.profileWrapper}>
|
||||
<Image
|
||||
source={{
|
||||
uri: `${process.env.EXPO_PUBLIC_URL}` +
|
||||
uri: `${process.env.EXPO_PUBLIC_API_URL}` +
|
||||
`${status.partner.pfpUrl}`
|
||||
}}
|
||||
style={styles.profilePicture}
|
||||
@ -221,7 +221,7 @@ const RelationshipView: React.FC<RelationshipProps> = ({ pfpUrl }) => {
|
||||
{user && (
|
||||
<ThemedView style={styles.profileWrapper}>
|
||||
<Image
|
||||
source={{ uri: `${process.env.EXPO_PUBLIC_URL}${user.pfpUrl}` }}
|
||||
source={{ uri: `${process.env.EXPO_PUBLIC_API_URL}${user.pfpUrl}` }}
|
||||
style={styles.profilePicture}
|
||||
/>
|
||||
<ThemedText style={styles.name}>
|
||||
@ -232,7 +232,7 @@ const RelationshipView: React.FC<RelationshipProps> = ({ pfpUrl }) => {
|
||||
{status.partner && (
|
||||
<ThemedView style={styles.profileWrapper}>
|
||||
<Image
|
||||
source={{ uri: `${process.env.EXPO_PUBLIC_URL}` +
|
||||
source={{ uri: `${process.env.EXPO_PUBLIC_API_URL}` +
|
||||
`${status.partner.pfpUrl}` }}
|
||||
style={styles.profilePicture}
|
||||
/>
|
||||
|
@ -19,6 +19,7 @@ const UserInfo: React.FC<UserInfoProps> = ({ onPfpUpdate }) => {
|
||||
try {
|
||||
const user: User = await getUser() as User;
|
||||
setUser(user);
|
||||
console.log(`${process.env.EXPO_PUBLIC_API_URL}${user.pfpUrl}`);
|
||||
if (user.pfpUrl)
|
||||
onPfpUpdate(user.pfpUrl);
|
||||
} catch (error) {
|
||||
@ -72,7 +73,7 @@ const UserInfo: React.FC<UserInfoProps> = ({ onPfpUpdate }) => {
|
||||
<TouchableOpacity onPress={handleUpdateProfilePicture}>
|
||||
<Image
|
||||
source={user.pfpUrl ? {
|
||||
uri: `${process.env.EXPO_PUBLIC_URL}${user.pfpUrl}`} :
|
||||
uri: `${process.env.EXPO_PUBLIC_API_URL}${user.pfpUrl}`} :
|
||||
require('@/assets/images/default-profile.png')}
|
||||
style={styles.profilePicture}
|
||||
/>
|
||||
@ -114,5 +115,3 @@ const styles = StyleSheet.create({
|
||||
marginBottom: 20,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user