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}>
|
<ThemedView style={styles.profileWrapper}>
|
||||||
<Image
|
<Image
|
||||||
source={{
|
source={{
|
||||||
uri: `${process.env.EXPO_PUBLIC_URL}` +
|
uri: `${process.env.EXPO_PUBLIC_API_URL}` +
|
||||||
`${status.partner.pfpUrl}`
|
`${status.partner.pfpUrl}`
|
||||||
}}
|
}}
|
||||||
style={styles.profilePicture}
|
style={styles.profilePicture}
|
||||||
@ -185,7 +185,7 @@ const RelationshipView: React.FC<RelationshipProps> = ({ pfpUrl }) => {
|
|||||||
<ThemedView style={styles.profileWrapper}>
|
<ThemedView style={styles.profileWrapper}>
|
||||||
<Image
|
<Image
|
||||||
source={{
|
source={{
|
||||||
uri: `${process.env.EXPO_PUBLIC_URL}` +
|
uri: `${process.env.EXPO_PUBLIC_API_URL}` +
|
||||||
`${status.partner.pfpUrl}`
|
`${status.partner.pfpUrl}`
|
||||||
}}
|
}}
|
||||||
style={styles.profilePicture}
|
style={styles.profilePicture}
|
||||||
@ -221,7 +221,7 @@ const RelationshipView: React.FC<RelationshipProps> = ({ pfpUrl }) => {
|
|||||||
{user && (
|
{user && (
|
||||||
<ThemedView style={styles.profileWrapper}>
|
<ThemedView style={styles.profileWrapper}>
|
||||||
<Image
|
<Image
|
||||||
source={{ uri: `${process.env.EXPO_PUBLIC_URL}${user.pfpUrl}` }}
|
source={{ uri: `${process.env.EXPO_PUBLIC_API_URL}${user.pfpUrl}` }}
|
||||||
style={styles.profilePicture}
|
style={styles.profilePicture}
|
||||||
/>
|
/>
|
||||||
<ThemedText style={styles.name}>
|
<ThemedText style={styles.name}>
|
||||||
@ -232,7 +232,7 @@ const RelationshipView: React.FC<RelationshipProps> = ({ pfpUrl }) => {
|
|||||||
{status.partner && (
|
{status.partner && (
|
||||||
<ThemedView style={styles.profileWrapper}>
|
<ThemedView style={styles.profileWrapper}>
|
||||||
<Image
|
<Image
|
||||||
source={{ uri: `${process.env.EXPO_PUBLIC_URL}` +
|
source={{ uri: `${process.env.EXPO_PUBLIC_API_URL}` +
|
||||||
`${status.partner.pfpUrl}` }}
|
`${status.partner.pfpUrl}` }}
|
||||||
style={styles.profilePicture}
|
style={styles.profilePicture}
|
||||||
/>
|
/>
|
||||||
|
@ -19,6 +19,7 @@ const UserInfo: React.FC<UserInfoProps> = ({ onPfpUpdate }) => {
|
|||||||
try {
|
try {
|
||||||
const user: User = await getUser() as User;
|
const user: User = await getUser() as User;
|
||||||
setUser(user);
|
setUser(user);
|
||||||
|
console.log(`${process.env.EXPO_PUBLIC_API_URL}${user.pfpUrl}`);
|
||||||
if (user.pfpUrl)
|
if (user.pfpUrl)
|
||||||
onPfpUpdate(user.pfpUrl);
|
onPfpUpdate(user.pfpUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -72,7 +73,7 @@ const UserInfo: React.FC<UserInfoProps> = ({ onPfpUpdate }) => {
|
|||||||
<TouchableOpacity onPress={handleUpdateProfilePicture}>
|
<TouchableOpacity onPress={handleUpdateProfilePicture}>
|
||||||
<Image
|
<Image
|
||||||
source={user.pfpUrl ? {
|
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')}
|
require('@/assets/images/default-profile.png')}
|
||||||
style={styles.profilePicture}
|
style={styles.profilePicture}
|
||||||
/>
|
/>
|
||||||
@ -114,5 +115,3 @@ const styles = StyleSheet.create({
|
|||||||
marginBottom: 20,
|
marginBottom: 20,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user