Remove activityType and Id (#1179)
* Remove activityType and Id * Fix tests * Fix tests
This commit is contained in:
@ -1,9 +1,12 @@
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { selectedRowIdsSelector } from '@/ui/table/states/selectedRowIdsSelector';
|
||||
import { ActivityType, CommentableType } from '~/generated/graphql';
|
||||
import { ActivityType } from '~/generated/graphql';
|
||||
|
||||
import { CommentableEntity } from '../types/CommentableEntity';
|
||||
import {
|
||||
ActivityTargetableEntity,
|
||||
ActivityTargetableEntityType,
|
||||
} from '../types/ActivityTargetableEntity';
|
||||
|
||||
import { useOpenCreateActivityDrawer } from './useOpenCreateActivityDrawer';
|
||||
|
||||
@ -14,14 +17,13 @@ export function useOpenCreateActivityDrawerForSelectedRowIds() {
|
||||
|
||||
return function openCreateCommentDrawerForSelectedRowIds(
|
||||
type: ActivityType,
|
||||
entityType: CommentableType,
|
||||
entityType: ActivityTargetableEntityType,
|
||||
) {
|
||||
const commentableEntityArray: CommentableEntity[] = selectedEntityIds.map(
|
||||
(id) => ({
|
||||
const activityTargetableEntityArray: ActivityTargetableEntity[] =
|
||||
selectedEntityIds.map((id) => ({
|
||||
type: entityType,
|
||||
id,
|
||||
}),
|
||||
);
|
||||
openCreateActivityDrawer(type, commentableEntityArray);
|
||||
}));
|
||||
openCreateActivityDrawer(type, activityTargetableEntityArray);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user