File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
apps/meteor/client/hooks/roomActions Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @rocket.chat/meteor ' : patch
3+ ---
4+
5+ Fixes an issue where the outlook calendar action isn't being reactive based on the setting
Original file line number Diff line number Diff line change 1- import { useUser } from '@rocket.chat/ui-contexts' ;
1+ import { useSetting } from '@rocket.chat/ui-contexts' ;
22import type { RoomToolboxActionConfig } from '@rocket.chat/ui-contexts' ;
33import { lazy , useMemo } from 'react' ;
44
55const OutlookEventsRoute = lazy ( ( ) => import ( '../../views/outlookCalendar/OutlookEventsRoute' ) ) ;
66
77export const useOutlookCalenderRoomAction = ( ) => {
8- const user = useUser ( ) ;
8+ const enabled = useSetting ( 'Outlook_Calendar_Enabled' , false ) ;
99
1010 return useMemo ( ( ) : RoomToolboxActionConfig | undefined => {
11- if ( ! user ?. settings ?. calendar ?. outlook ?. Enabled ) {
11+ if ( ! enabled ) {
1212 return undefined ;
1313 }
1414
@@ -20,5 +20,5 @@ export const useOutlookCalenderRoomAction = () => {
2020 tabComponent : OutlookEventsRoute ,
2121 order : 999 ,
2222 } ;
23- } , [ user ?. settings ?. calendar ?. outlook ?. Enabled ] ) ;
23+ } , [ enabled ] ) ;
2424} ;
You can’t perform that action at this time.
0 commit comments