Update delete record message (#11132)

Update delete record message
This commit is contained in:
Raphaël Bosi
2025-03-24 20:22:05 +01:00
committed by GitHub
parent 52cf6f4795
commit fd23a6e5ff
2 changed files with 2 additions and 8 deletions

View File

@ -18,7 +18,6 @@ import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModa
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
import { t } from '@lingui/core/macro';
import { useCallback, useState } from 'react';
import { getOsControlSymbol } from 'twenty-ui';
import { isDefined } from 'twenty-shared/utils';
export const useDeleteMultipleRecordsAction: ActionHookWithObjectMetadataItem =
@ -110,14 +109,12 @@ export const useDeleteMultipleRecordsAction: ActionHookWithObjectMetadataItem =
setIsDeleteRecordsModalOpen(true);
};
const osControlSymbol = getOsControlSymbol();
const confirmationModal = (
<ConfirmationModal
isOpen={isDeleteRecordsModalOpen}
setIsOpen={setIsDeleteRecordsModalOpen}
title={'Delete Records'}
subtitle={t`Are you sure you want to delete these records? They can be recovered from the Command menu (${osControlSymbol} + K).`}
subtitle={t`Are you sure you want to delete these records? They can be recovered from the Command menu.`}
onConfirmClick={handleDeleteClick}
confirmButtonText={'Delete Records'}
/>

View File

@ -11,7 +11,6 @@ import { t } from '@lingui/core/macro';
import { isNull } from '@sniptt/guards';
import { useCallback, useState } from 'react';
import { useRecoilValue } from 'recoil';
import { getOsControlSymbol } from 'twenty-ui';
import { isDefined } from 'twenty-shared/utils';
export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
@ -72,8 +71,6 @@ export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
setIsDeleteRecordsModalOpen(true);
};
const osControlSymbol = getOsControlSymbol();
return {
shouldBeRegistered,
onClick,
@ -82,7 +79,7 @@ export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
isOpen={isDeleteRecordsModalOpen}
setIsOpen={setIsDeleteRecordsModalOpen}
title={'Delete Record'}
subtitle={t`Are you sure you want to delete this record? It can be recovered from the Command menu (${osControlSymbol} + K).`}
subtitle={t`Are you sure you want to delete this record? It can be recovered from the Command menu.`}
onConfirmClick={() => {
handleDeleteClick();
}}