Skip to content

Commit

Permalink
Remove update since actions will be edited
Browse files Browse the repository at this point in the history
  • Loading branch information
thomtrp committed Oct 9, 2024
1 parent ab02c89 commit 4afafaf
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem';
import { navigationMemorizedUrlState } from '@/ui/navigation/states/navigationMemorizedUrlState';

import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { isReadOnlyObject } from '@/object-metadata/utils/isReadOnlyObject';
import { useDestroyManyRecords } from '@/object-record/hooks/useDestroyManyRecords';
import { useRestoreManyRecords } from '@/object-record/hooks/useRestoreManyRecords';
import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';
Expand Down Expand Up @@ -66,8 +65,6 @@ export const ShowPageMoreButton = ({
recordStoreFamilyState(recordId),
);

const isReadOnly = isReadOnlyObject(objectMetadataItem);

return (
<StyledContainer>
<Dropdown
Expand All @@ -85,15 +82,15 @@ export const ShowPageMoreButton = ({
dropdownComponents={
<DropdownMenu>
<DropdownMenuItemsContainer>
{!isReadOnly && recordFromStore && !recordFromStore.deletedAt && (
{recordFromStore && !recordFromStore.deletedAt && (
<MenuItem
onClick={handleDelete}
accent="danger"
LeftIcon={IconTrash}
text="Delete"
/>
)}
{!isReadOnly && recordFromStore && recordFromStore.deletedAt && (
{recordFromStore && recordFromStore.deletedAt && (
<>
<MenuItem
onClick={handleDestroy}
Expand Down

0 comments on commit 4afafaf

Please sign in to comment.