* feat: rename commentThread into activity server * feat: rename commentThread into activity front * feat: migration only create tables feat: migration only create tables * Update activities * fix: rebase partial fix * fix: all rebase problems and drop activity target alter * fix: lint * Update migration * Update migration * Fix conflicts * Fix conflicts --------- Co-authored-by: Charles Bochet <charles@twenty.com>
29 lines
1019 B
TypeScript
29 lines
1019 B
TypeScript
import { useRecoilState } from 'recoil';
|
|
|
|
import { RightDrawerCreateActivity } from '@/activities/right-drawer/components/create/RightDrawerCreateActivity';
|
|
import { RightDrawerEditActivity } from '@/activities/right-drawer/components/edit/RightDrawerEditActivity';
|
|
import { RightDrawerTimeline } from '@/activities/right-drawer/components/RightDrawerTimeline';
|
|
import { isDefined } from '~/utils/isDefined';
|
|
|
|
import { rightDrawerPageState } from '../states/rightDrawerPageState';
|
|
import { RightDrawerPages } from '../types/RightDrawerPages';
|
|
|
|
export function RightDrawerRouter() {
|
|
const [rightDrawerPage] = useRecoilState(rightDrawerPageState);
|
|
|
|
if (!isDefined(rightDrawerPage)) {
|
|
return <></>;
|
|
}
|
|
|
|
switch (rightDrawerPage) {
|
|
case RightDrawerPages.Timeline:
|
|
return <RightDrawerTimeline />;
|
|
case RightDrawerPages.CreateActivity:
|
|
return <RightDrawerCreateActivity />;
|
|
case RightDrawerPages.EditActivity:
|
|
return <RightDrawerEditActivity />;
|
|
default:
|
|
return <></>;
|
|
}
|
|
}
|