Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nasty-tomatoes-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes an issue where the outlook calendar action isn't being reactive based on the setting
Comment thread
dougfabris marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useUser } from '@rocket.chat/ui-contexts';
import { useSetting } from '@rocket.chat/ui-contexts';
import type { RoomToolboxActionConfig } from '@rocket.chat/ui-contexts';
import { lazy, useMemo } from 'react';

const OutlookEventsRoute = lazy(() => import('../../views/outlookCalendar/OutlookEventsRoute'));

export const useOutlookCalenderRoomAction = () => {
const user = useUser();
const enabled = useSetting('Outlook_Calendar_Enabled', false);
Comment thread
dougfabris marked this conversation as resolved.

return useMemo((): RoomToolboxActionConfig | undefined => {
if (!user?.settings?.calendar?.outlook?.Enabled) {
if (!enabled) {
return undefined;
}

Expand All @@ -20,5 +20,5 @@ export const useOutlookCalenderRoomAction = () => {
tabComponent: OutlookEventsRoute,
order: 999,
};
}, [user?.settings?.calendar?.outlook?.Enabled]);
}, [enabled]);
};
Loading