chore(*): remove unused code (#6781)

The code removed in the PR was flagged as unused by the JetBrains
inspector.

I did a QA on the dev environment but other checks are highly
recommended.

There is one commit by scope to make the review easier.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Antoine Moreaux
2024-08-29 18:16:50 +02:00
committed by GitHub
parent ebfdc6cfd2
commit cd06ae20e8
86 changed files with 97 additions and 575 deletions

View File

@ -121,11 +121,13 @@ export const useRecordActionBar = ({
title={`Delete ${numberOfSelectedRecords} ${
numberOfSelectedRecords === 1 ? `record` : 'records'
}`}
subtitle={`This action cannot be undone. This will permanently delete ${
subtitle={`Are you sure you want to delete ${
numberOfSelectedRecords === 1
? 'this record'
: 'these records'
}`}
}? ${
numberOfSelectedRecords === 1 ? 'It' : 'They'
} can be recovered from the Options menu.`}
onConfirmClick={() => handleDeleteClick()}
deleteButtonText={`Delete ${
numberOfSelectedRecords > 1 ? 'Records' : 'Record'

View File

@ -52,7 +52,7 @@ export const useHandleToggleTrashColumnFilter = ({
operand: ViewFilterOperand.IsNotEmpty,
displayValue: '',
definition: {
label: 'Trash',
label: `Deleted ${objectNameSingular}`,
iconName: 'IconTrash',
fieldMetadataId: trashFieldMetadata.id,
type: filterType,
@ -61,7 +61,12 @@ export const useHandleToggleTrashColumnFilter = ({
};
upsertCombinedViewFilter(newFilter);
}, [columnDefinitions, objectMetadataItem.fields, upsertCombinedViewFilter]);
}, [
columnDefinitions,
objectMetadataItem.fields,
objectNameSingular,
upsertCombinedViewFilter,
]);
return handleToggleTrashColumnFilter;
};

View File

@ -166,7 +166,7 @@ export const RecordIndexOptionsDropdownContent = ({
closeDropdown();
}}
LeftIcon={IconTrash}
text="Trash"
text={`Deleted ${objectNameSingular}`}
/>
</DropdownMenuItemsContainer>
)}