diff --git a/src/components/ImageUpload/imageUpload.css b/src/components/ImageUpload/imageUpload.css
index 51745a12..3cf18891 100644
--- a/src/components/ImageUpload/imageUpload.css
+++ b/src/components/ImageUpload/imageUpload.css
@@ -39,6 +39,7 @@
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
+ max-height: 100%;
display: inline-block;
margin-left: 10px;
}
diff --git a/src/pages/Dashboard/AddUser/AddUser.jsx b/src/pages/Dashboard/AddUser/AddUser.jsx
index 679288bf..ecdcae6b 100644
--- a/src/pages/Dashboard/AddUser/AddUser.jsx
+++ b/src/pages/Dashboard/AddUser/AddUser.jsx
@@ -111,7 +111,7 @@ const AddUser = () => {
}
if (userId && userId !== user?.id) {
- getUser({ userId, calendarId })
+ getUser({ userId, calendarId, sessionId: timestampRef })
.unwrap()
.then((response) => {
const activeCalendars = response?.roles?.filter((r) => {
@@ -869,26 +869,26 @@ const AddUser = () => {
- {selectedCalendars?.map((calendar, index) => (
+ {selectedCalendars?.map((selectedCalendar, index) => (
{
- removeCalendarHandler({ item: calendar, index });
+ removeCalendarHandler({ item: selectedCalendar, index });
}}
/>
))}
diff --git a/src/pages/Dashboard/Dashboard.jsx b/src/pages/Dashboard/Dashboard.jsx
index 9b3b90f9..75a2675b 100644
--- a/src/pages/Dashboard/Dashboard.jsx
+++ b/src/pages/Dashboard/Dashboard.jsx
@@ -46,7 +46,7 @@ function Dashboard() {
isLoading,
isSuccess,
refetch,
- } = useGetAllCalendarsQuery({ sessionId: timestampRef }, { skip: accessToken ? false : true });
+ } = useGetAllCalendarsQuery({ sessionId: timestampRef });
const [getCurrentUserDetails, { isLoading: isCurrentUserLoading }] = useLazyGetCurrentUserQuery();
@@ -69,6 +69,15 @@ function Dashboard() {
};
useEffect(() => {
+ if (location?.state?.previousPath?.toLowerCase() === 'login') {
+ dispatch(setInterfaceLanguage(user?.interfaceLanguage?.toLowerCase()));
+ i18n.changeLanguage(user?.interfaceLanguage?.toLowerCase());
+ }
+ }, [accessToken]);
+
+ useEffect(() => {
+ if (!isSuccess) return;
+
const accessTokenFromCookie = Cookies.get('accessToken');
const refreshTokenFromCookie = Cookies.get('refreshToken');
const calendarIdFromCookie = Cookies.get('calendarId');
@@ -80,7 +89,7 @@ function Dashboard() {
const token = accessToken || accessTokenFromCookie;
- getCurrentUserDetails({ accessToken: token, calendarId: calId })
+ getCurrentUserDetails({ accessToken: token, calendarId: calId, sessionId: timestampRef })
.unwrap()
.then((response) => {
dispatch(
@@ -90,12 +99,7 @@ function Dashboard() {
.catch(() => {
navigate(PathName.Login);
});
-
- if (location?.state?.previousPath?.toLowerCase() === 'login') {
- dispatch(setInterfaceLanguage(user?.interfaceLanguage?.toLowerCase()));
- i18n.changeLanguage(user?.interfaceLanguage?.toLowerCase());
- }
- }, [accessToken, isSuccess]);
+ }, [isSuccess]);
useEffect(() => {
if (!isSuccess) return;