From f1fc71b60a4636c8f2cc8d6496c14166f5bb220a Mon Sep 17 00:00:00 2001 From: iso9000t <119494473+iso9000t@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:22:24 +0400 Subject: [PATCH] EPMRPP-98421 || Code review fixes - 3 --- app/src/common/urls.js | 7 +++++-- .../layouts/common/appSidebar/userControl/userControl.jsx | 5 ++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/common/urls.js b/app/src/common/urls.js index 40d8d355a0..900ec7dff4 100644 --- a/app/src/common/urls.js +++ b/app/src/common/urls.js @@ -35,8 +35,11 @@ export const URLS = { apiDocs: (apiType) => `${apiType}/api-docs`, dataPhoto: (at, loadThumbnail) => `${urlBase}data/photo${getQueryParams({ at, loadThumbnail })}`, - userAvatar: (userId, thumbnail = false) => - `${urlCommonBase}users/${userId}/avatar${getQueryParams({ thumbnail })}`, + userAvatar: (userId, thumbnail = false, timestamp = null) => + `${urlCommonBase}users/${userId}/avatar${getQueryParams({ + thumbnail, + ...(timestamp ? { ts: timestamp } : {}), + })}`, dashboard: (projectKey, id) => `${urlBase}${projectKey}/dashboard/${id}`, dashboards: (projectKey, params) => diff --git a/app/src/layouts/common/appSidebar/userControl/userControl.jsx b/app/src/layouts/common/appSidebar/userControl/userControl.jsx index 5a3a1b6641..700722f441 100644 --- a/app/src/layouts/common/appSidebar/userControl/userControl.jsx +++ b/app/src/layouts/common/appSidebar/userControl/userControl.jsx @@ -35,14 +35,12 @@ const UserControl = ({ onClick }) => { const { userRole, fullName, email, id } = useSelector(userInfoSelector); const photoTimeStamp = useSelector(photoTimeStampSelector); - const avatarUrl = `${URLS.userAvatar(id, true)}${photoTimeStamp ? `&ts=${photoTimeStamp}` : ''}`; - return (