Feat/activity optimistic activities (#4009)
* Fix naming * Fixed cache.evict bug for relation target deletion * Fixed cascade delete activity targets * Working version * Fix * fix * WIP * Fixed optimistic effect target inline cell * Removed openCreateActivityDrawer v1 * Ok for timeline * Removed console.log * Fix update record optimistic effect * Refactored activity queries into useActivities for everything * Fixed bugs * Cleaned * Fix lint --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -6,12 +6,15 @@ import { rightDrawerPageState } from '../states/rightDrawerPageState';
|
||||
import { RightDrawerPages } from '../types/RightDrawerPages';
|
||||
|
||||
export const useRightDrawer = () => {
|
||||
const [, setIsRightDrawerOpen] = useRecoilState(isRightDrawerOpenState);
|
||||
const [isRightDrawerOpen, setIsRightDrawerOpen] = useRecoilState(
|
||||
isRightDrawerOpenState,
|
||||
);
|
||||
const [, setIsRightDrawerExpanded] = useRecoilState(
|
||||
isRightDrawerExpandedState,
|
||||
);
|
||||
|
||||
const [, setRightDrawerPage] = useRecoilState(rightDrawerPageState);
|
||||
const [rightDrawerPage, setRightDrawerPage] =
|
||||
useRecoilState(rightDrawerPageState);
|
||||
|
||||
const openRightDrawer = (rightDrawerPage: RightDrawerPages) => {
|
||||
setRightDrawerPage(rightDrawerPage);
|
||||
@ -25,6 +28,8 @@ export const useRightDrawer = () => {
|
||||
};
|
||||
|
||||
return {
|
||||
rightDrawerPage,
|
||||
isRightDrawerOpen,
|
||||
openRightDrawer,
|
||||
closeRightDrawer,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user