diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 89aa8043..e6d29715 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -16,10 +16,10 @@ import useMyBranchStore from 'stores/my-branch'; import { useConfigStore } from 'src/stores/config'; import { useNavigator } from 'src/stores/navigator'; import { initLang, initTheme, Lang, setLang } from 'src/utils/ui'; +import { baseUrl } from 'stores/utils'; const useMyBranch = useMyBranchStore(); const { fetchListMyBranch } = useMyBranch; -const apiBaseUrl = import.meta.env.VITE_API_BASE_URL; interface NotificationButton { item: string; @@ -141,11 +141,10 @@ onMounted(async () => { if (user === 'admin') return; if (uid) { - userImage.value = `${apiBaseUrl}/user/${uid}/image`; - const res = await userStore.fetchById(uid); if (res && res.gender) { userGender.value = res.gender; + userImage.value = `${baseUrl}/user/${uid}/profile-image/${res.selectedImage}`; } } }); @@ -276,7 +275,7 @@ onMounted(async () => {
- {
- + {{ moment(item.createdAt).fromNow() }} 5 s { - + - + --> { @@ -280,12 +284,12 @@ onMounted(async () => { - +