From 6826c1e58f76905977a0780438a89f966cb1a3e0 Mon Sep 17 00:00:00 2001 From: Koosha Lahouti Date: Mon, 18 Aug 2025 17:14:54 +0330 Subject: [PATCH] fix: image upload --- .env | 3 ++- .../components/userInformation/PersonalInformation.tsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) 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);