Skip to content

Commit

Permalink
manually clear DependencyActions (#7827)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymek authored Aug 12, 2024
1 parent e77bb1b commit 8091987
Showing 1 changed file with 26 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type React from 'react';
import { type FC, useState } from 'react';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import {
IconButton,
ListItemIcon,
Expand Down Expand Up @@ -71,47 +70,33 @@ export const DependencyActions: FC<{
disableScrollLock={true}
>
<MenuList aria-labelledby={id}>
<ConditionallyRender
condition={true}
show={
<MenuItem
onClick={() => {
onEdit();
closeActions();
}}
>
<ListItemIcon>
<Edit />
</ListItemIcon>
<ListItemText>
<Typography variant='body2'>
Edit
</Typography>
</ListItemText>
</MenuItem>
}
/>
<MenuItem
onClick={() => {
onEdit();
closeActions();
}}
>
<ListItemIcon>
<Edit />
</ListItemIcon>
<ListItemText>
<Typography variant='body2'>Edit</Typography>
</ListItemText>
</MenuItem>

<ConditionallyRender
condition={true}
show={
<MenuItem
onClick={() => {
onDelete();
closeActions();
}}
>
<ListItemIcon>
<Delete />
</ListItemIcon>
<ListItemText>
<Typography variant='body2'>
Delete
</Typography>
</ListItemText>
</MenuItem>
}
/>
<MenuItem
onClick={() => {
onDelete();
closeActions();
}}
>
<ListItemIcon>
<Delete />
</ListItemIcon>
<ListItemText>
<Typography variant='body2'>Delete</Typography>
</ListItemText>
</MenuItem>
</MenuList>
</StyledPopover>
</Box>
Expand Down

0 comments on commit 8091987

Please sign in to comment.