Feat/open comment drawer from comment chip (#187)
* wip * Can open comment right drawer from company name cell
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { useOpenRightDrawer } from '../../ui/layout/right-drawer/hooks/useOpenRightDrawer';
|
||||
import { CommentableEntity } from '../types/CommentableEntity';
|
||||
import { commentableEntityArrayState } from '../states/commentableEntityArrayState';
|
||||
|
||||
export function useOpenCommentRightDrawer() {
|
||||
const openRightDrawer = useOpenRightDrawer();
|
||||
const [, setCommentableEntityArray] = useRecoilState(
|
||||
commentableEntityArrayState,
|
||||
);
|
||||
|
||||
return function openCommentRightDrawer(
|
||||
commentableEntityArray: CommentableEntity[],
|
||||
) {
|
||||
setCommentableEntityArray(commentableEntityArray);
|
||||
openRightDrawer('comments');
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user