004c23768c
* Trigger message thread top bar * Rename message thread to thread * Move all components in a directory --------- Co-authored-by: Thomas Trompette <thomast@twenty.com>
15 lines
635 B
TypeScript
15 lines
635 B
TypeScript
import { useRightDrawer } from '@/ui/layout/right-drawer/hooks/useRightDrawer';
|
|
import { RightDrawerHotkeyScope } from '@/ui/layout/right-drawer/types/RightDrawerHotkeyScope';
|
|
import { RightDrawerPages } from '@/ui/layout/right-drawer/types/RightDrawerPages';
|
|
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
|
|
|
|
export const useOpenThreadRightDrawer = () => {
|
|
const { openRightDrawer } = useRightDrawer();
|
|
const setHotkeyScope = useSetHotkeyScope();
|
|
|
|
return () => {
|
|
setHotkeyScope(RightDrawerHotkeyScope.RightDrawer, { goto: false });
|
|
openRightDrawer(RightDrawerPages.ViewThread);
|
|
};
|
|
};
|