Merge pull request 'Đổi đường dẫn giữa môi trường pro và local' (#46) from Sprint-3/MS-23 into master

Reviewed-on: #46
This commit is contained in:
vincent.vo 2024-09-19 14:21:45 +10:00
commit 1de318b86e
2 changed files with 12 additions and 2 deletions

View File

@ -369,7 +369,13 @@ const Navbar = ({
<Avatar
src={
avatar !== ''
? import.meta.env.VITE_BACKEND_URL + 'storage/' + avatar
? import.meta.env.VITE_BACKEND_URL.includes('local')
? import.meta.env.VITE_BACKEND_URL +
'storage/' +
avatar
: import.meta.env.VITE_BACKEND_URL +
'image/storage/' +
avatar
: ''
}
alt="User Avatar"

View File

@ -279,7 +279,11 @@ const Profile = () => {
selectedAvatar
? selectedAvatar
: avatar !== ''
? import.meta.env.VITE_BACKEND_URL + 'storage/' + avatar
? import.meta.env.VITE_BACKEND_URL.includes('local')
? import.meta.env.VITE_BACKEND_URL + 'storage/' + avatar
: import.meta.env.VITE_BACKEND_URL +
'image/storage/' +
avatar
: ''
}
alt="User Avatar"