From e0a221b80da95d5f4bca7946774d00f9577d5a70 Mon Sep 17 00:00:00 2001 From: artem Date: Thu, 9 May 2024 12:38:35 +0300 Subject: [PATCH] add avatar --- src/stores/user-store.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/stores/user-store.ts b/src/stores/user-store.ts index 6f27248..5cbbdb3 100644 --- a/src/stores/user-store.ts +++ b/src/stores/user-store.ts @@ -29,9 +29,13 @@ export const useUserStore = defineStore("user", { if (mm < 10) { strinMM = '0' + strinMM; } + let avatar = defaultAvatar; + if (dataAttachments.avatar != null) { + avatar = dataAttachments.avatar.url; + } const formattedToday = stringDD + '/' + strinMM + '/' + yyyy; return { - avatar: dataAttachments.avatar.url || defaultAvatar, + avatar: avatar, profileID: dataProfile.id || "", userName: dataProfile.first_name || "", userSurname: dataProfile.surname || "",