Expand on right drawer (#769)

Ok
This commit is contained in:
Lucas Bordeau
2023-07-20 00:00:50 +02:00
committed by GitHub
parent 3336e6960d
commit c8065f82e8
13 changed files with 103 additions and 54 deletions

View File

@ -1,14 +1,14 @@
import { useRecoilState } from 'recoil';
import { useSetHotkeyScope } from '@/ui/hotkey/hooks/useSetHotkeyScope';
import { useOpenRightDrawer } from '@/ui/right-drawer/hooks/useOpenRightDrawer';
import { useRightDrawer } from '@/ui/right-drawer/hooks/useRightDrawer';
import { RightDrawerHotkeyScope } from '@/ui/right-drawer/types/RightDrawerHotkeyScope';
import { RightDrawerPages } from '@/ui/right-drawer/types/RightDrawerPages';
import { viewableCommentThreadIdState } from '../states/viewableCommentThreadIdState';
export function useOpenCommentThreadRightDrawer() {
const openRightDrawer = useOpenRightDrawer();
const { openRightDrawer } = useRightDrawer();
const [, setViewableCommentThreadId] = useRecoilState(
viewableCommentThreadIdState,
);

View File

@ -6,7 +6,7 @@ import { currentUserState } from '@/auth/states/currentUserState';
import { GET_COMPANIES } from '@/companies/queries';
import { GET_PEOPLE } from '@/people/queries';
import { useSetHotkeyScope } from '@/ui/hotkey/hooks/useSetHotkeyScope';
import { useOpenRightDrawer } from '@/ui/right-drawer/hooks/useOpenRightDrawer';
import { useRightDrawer } from '@/ui/right-drawer/hooks/useRightDrawer';
import { RightDrawerHotkeyScope } from '@/ui/right-drawer/types/RightDrawerHotkeyScope';
import { RightDrawerPages } from '@/ui/right-drawer/types/RightDrawerPages';
import { selectedRowIdsSelector } from '@/ui/table/states/selectedRowIdsSelector';
@ -22,7 +22,7 @@ import { viewableCommentThreadIdState } from '../states/viewableCommentThreadIdS
import { CommentableEntity } from '../types/CommentableEntity';
export function useOpenCreateCommentThreadDrawerForSelectedRowIds() {
const openRightDrawer = useOpenRightDrawer();
const { openRightDrawer } = useRightDrawer();
const [createCommentThreadMutation] = useCreateCommentThreadMutation();
const currentUser = useRecoilValue(currentUserState);
const [, setViewableCommentThreadId] = useRecoilState(

View File

@ -6,7 +6,7 @@ import { currentUserState } from '@/auth/states/currentUserState';
import { GET_COMPANIES } from '@/companies/queries';
import { GET_PEOPLE } from '@/people/queries';
import { useSetHotkeyScope } from '@/ui/hotkey/hooks/useSetHotkeyScope';
import { useOpenRightDrawer } from '@/ui/right-drawer/hooks/useOpenRightDrawer';
import { useRightDrawer } from '@/ui/right-drawer/hooks/useRightDrawer';
import { RightDrawerHotkeyScope } from '@/ui/right-drawer/types/RightDrawerHotkeyScope';
import { RightDrawerPages } from '@/ui/right-drawer/types/RightDrawerPages';
import {
@ -20,7 +20,7 @@ import { viewableCommentThreadIdState } from '../states/viewableCommentThreadIdS
import { CommentableEntity } from '../types/CommentableEntity';
export function useOpenCreateCommentThreadDrawer() {
const openRightDrawer = useOpenRightDrawer();
const { openRightDrawer } = useRightDrawer();
const [createCommentThreadMutation] = useCreateCommentThreadMutation();
const currentUser = useRecoilValue(currentUserState);
const setHotkeyScope = useSetHotkeyScope();

View File

@ -1,7 +1,7 @@
import { useRecoilState } from 'recoil';
import { useSetHotkeyScope } from '@/ui/hotkey/hooks/useSetHotkeyScope';
import { useOpenRightDrawer } from '@/ui/right-drawer/hooks/useOpenRightDrawer';
import { useRightDrawer } from '@/ui/right-drawer/hooks/useRightDrawer';
import { RightDrawerHotkeyScope } from '@/ui/right-drawer/types/RightDrawerHotkeyScope';
import { RightDrawerPages } from '@/ui/right-drawer/types/RightDrawerPages';
@ -10,7 +10,7 @@ import { CommentableEntity } from '../types/CommentableEntity';
// TODO: refactor with recoil callback to avoid rerender
export function useOpenTimelineRightDrawer() {
const openRightDrawer = useOpenRightDrawer();
const { openRightDrawer } = useRightDrawer();
const [, setCommentableEntityArray] = useRecoilState(
commentableEntityArrayState,
);