From 58c28258fc5c08674e05cceba4c027e7aa28adb9 Mon Sep 17 00:00:00 2001 From: bosiraphael Date: Thu, 19 Dec 2024 15:53:39 +0100 Subject: [PATCH] renaming --- ...ectV2.ts => triggerUpdateRecordOptimisticEffectByBatch.ts} | 2 +- .../src/modules/object-record/hooks/useDeleteManyRecords.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename packages/twenty-front/src/modules/apollo/optimistic-effect/utils/{triggerUpdateRecordOptimisticEffectV2.ts => triggerUpdateRecordOptimisticEffectByBatch.ts} (98%) diff --git a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectV2.ts b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectByBatch.ts similarity index 98% rename from packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectV2.ts rename to packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectByBatch.ts index 52171b0838d1..0b115f958ecd 100644 --- a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectV2.ts +++ b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectByBatch.ts @@ -14,7 +14,7 @@ import { parseApolloStoreFieldName } from '~/utils/parseApolloStoreFieldName'; // TODO: add extensive unit tests for this function // That will also serve as documentation -export const triggerUpdateRecordOptimisticEffectV2 = ({ +export const triggerUpdateRecordOptimisticEffectByBatch = ({ cache, objectMetadataItem, currentRecords, diff --git a/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecords.ts b/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecords.ts index cb50ec1bea2b..4de099eb27d7 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecords.ts +++ b/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecords.ts @@ -1,7 +1,7 @@ import { useApolloClient } from '@apollo/client'; import { triggerUpdateRecordOptimisticEffect } from '@/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffect'; -import { triggerUpdateRecordOptimisticEffectV2 } from '@/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectV2'; +import { triggerUpdateRecordOptimisticEffectByBatch } from '@/apollo/optimistic-effect/utils/triggerUpdateRecordOptimisticEffectByBatch'; import { apiConfigState } from '@/client-config/states/apiConfigState'; import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem'; import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems'; @@ -128,7 +128,7 @@ export const useDeleteManyRecords = ({ }); }); - triggerUpdateRecordOptimisticEffectV2({ + triggerUpdateRecordOptimisticEffectByBatch({ cache: apolloClient.cache, objectMetadataItem, currentRecords: cachedRecordsWithConnection,