Skip to content

Commit

Permalink
fix: change image url to show profile image - #46
Browse files Browse the repository at this point in the history
  • Loading branch information
byein committed Jan 2, 2023
1 parent 09a9d1c commit cb3681d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
7 changes: 4 additions & 3 deletions baedalmate/src/components/atoms/Chat/MemberListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ export const MemberList = ({item}: {item: participantI}) => {
paddingBottom: 15,
}}>
<Image
source={{
uri: item?.profileImage.replace('http', 'https'),
}}
// source={{
// uri: item?.profileImage.replace('http', 'https'),
// }}
source={{uri: url + '/images/' + item.profileImage}}
style={{
width: 45,
height: 45,
Expand Down
8 changes: 5 additions & 3 deletions baedalmate/src/components/atoms/Chat/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {url} from '../../../../App';
import {messageI} from 'components/utils/Chat';
import React from 'react';
import {Image, StyleSheet, Text, View} from 'react-native';
Expand All @@ -7,9 +8,10 @@ export const ChatProfileImage = ({image}: {image: string}) => {
return (
<View style={{width: 30, height: 30}}>
<Image
source={{
uri: image.includes('https') ? image : image.replace('http', 'https'),
}}
// source={{
// uri: image.includes('https') ? image : image.replace('http', 'https'),
// }}
source={{uri: url + '/images/' + image}}
style={{
width: 30,
height: 30,
Expand Down
11 changes: 6 additions & 5 deletions baedalmate/src/components/atoms/Header/ChatHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ export const ReviewMemberList = ({
justifyContent: 'center',
}}>
<Image
source={{
uri: item.profileImage.includes('https')
? item.profileImage
: item.profileImage.replace('http', 'https'),
}}
source={{uri: url + '/images/' + item.profileImage}}
// source={{
// uri: item.profileImage.includes('https')
// ? item.profileImage
// : item.profileImage.replace('http', 'https'),
// }}
style={{
width: 45,
height: 45,
Expand Down
24 changes: 12 additions & 12 deletions baedalmate/src/components/atoms/Image/UserImage.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import {url} from '../../../../App';
import {RecruitItemProps} from 'components/pages/Detail';
import React from 'react';
import {Image, StyleSheet, Text, TouchableOpacity, View} from 'react-native';
import {Image, StyleSheet, View} from 'react-native';
import {MyPageI} from 'components/pages/Setting/MyPage';
import {BAEMIN_ICON} from 'themes/theme';
import {url} from '../../../../App';

export type BtnWithoutTextProps = {
onPress(): void;
};

const UserProfileImage = ({item}: {item: RecruitItemProps | undefined}) => {
// console.log(item?.profileImage);
console.log(item?.profileImage.replace('http', 'https'));
BAEMIN_ICON;
// console.log(item?.profileImage.replace('http', 'https'));
return (
<Image
source={{
uri: item?.profileImage.replace('http', 'https'),
}}
// source={{
// uri: item?.profileImage.replace('http', 'https'),
// }}
source={{uri: url + '/images/' + item?.profileImage}}
style={{
width: 45,
height: 45,
Expand All @@ -37,11 +36,12 @@ const MyPageUserProfileImage = ({item}: {item: MyPageI | undefined}) => {
// uri: url + '/images/' + item?.profileImage,
}}
style={{
width: 60,
height: 60,
width: 55,
height: 55,
backgroundColor: '#ffffff',
borderRadius: 60 / 2,
marginHorizontal: 15,
borderRadius: 55 / 2,
marginRight: 15,
marginLeft: 5,
}}
/>
</View>
Expand Down
8 changes: 5 additions & 3 deletions baedalmate/src/components/pages/OrderMenuList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
recruitParticipantsI,
} from 'components/utils/Chat';
import {formPrice, getJWTToken} from 'components/utils/Recruit';
import {url} from '../../../App';

export interface RecruitItemProps {
createDate: string;
Expand Down Expand Up @@ -291,9 +292,10 @@ const OrderMenuItem = ({
// justifyContent: 'center',
}}>
<Image
source={{
uri: currentParticipant?.image?.replace('http', 'https'),
}}
source={{uri: url + '/images/' + currentParticipant?.image}}
// source={{
// uri: currentParticipant?.image?.replace('http', 'https'),
// }}
style={{
width: 45,
height: 45,
Expand Down

0 comments on commit cb3681d

Please sign in to comment.