diff --git a/.env b/.env index b5ec710..6255b93 100644 --- a/.env +++ b/.env @@ -3,4 +3,5 @@ VITE_DEFUALT_AUTH_RETURN_URL=/setting/profile VITE_API_URL=https://accounts.business-harmony.com/api/ VITE_IDENTITY_URL=https://accounts.business-harmony.com/connect/token VITE_IDENTITY_CLIENT_ID=harmony_identity -VITE_IDENTITY_SCOPE=openid profile offline_access harmony_identity \ No newline at end of file +VITE_IDENTITY_SCOPE=openid profile offline_access harmony_identity +IMAGE_BASE_URL=https://accounts.business-harmony.com/uploads/ diff --git a/src/features/profile/components/userInformation/PersonalInformation.tsx b/src/features/profile/components/userInformation/PersonalInformation.tsx index a6b2ce4..32e077d 100644 --- a/src/features/profile/components/userInformation/PersonalInformation.tsx +++ b/src/features/profile/components/userInformation/PersonalInformation.tsx @@ -50,11 +50,13 @@ export function PersonalInformation() { : Gender.None, country: profileData.countryCode ?? '', }; + setData(fetchedData); setOriginalData(fetchedData); + const imageBaseUrl = process.env.IMAGE_BASE_URL; + if (profileData.profileImageUrl) { - const imageBaseUrl = 'https://accounts.business-harmony.com/uploads/'; setUploadedImageUrl(`${imageBaseUrl}${profileData.profileImageUrl}`); } else { setUploadedImageUrl(null);