Skip to content

Commit

Permalink
delete popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Agrim Jain authored and Agrim Jain committed May 7, 2024
1 parent c6c5cfc commit ab7c2e5
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/features/dashboard/components/AppsTable/app-actions.cell.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
import React, { useState } from 'react';
import styles from './cells.module.scss';
import { LabelPairedPenSmRegularIcon, LabelPairedTrashSmRegularIcon } from '@deriv/quill-icons';
import { LabelPairedTrashSmRegularIcon } from '@deriv/quill-icons';
import DeleteAppDialog from '../Dialogs/DeleteAppDialog';
import UpdateAppDialog from '../Dialogs/UpdateAppDialog';
import CustomTooltip from '@site/src/components/CustomTooltip';

const AppActionsCell = () => {
const [isDeleteDialogOpen, setDeleteDialogOpen] = useState(false);
const [isUpdateDialogOpen, setUpdateDialogOpen] = useState(false);

const handleDeleteClick = () => {
setDeleteDialogOpen(true);
};

const handleUpdateClick = () => {
setUpdateDialogOpen(true);
};

return (
<div className={styles.appActions} data-testid={'app-action-cell'}>
<div onClick={handleUpdateClick} data-testid={'update-app-button'}>
<CustomTooltip text='Edit application details'>
<LabelPairedPenSmRegularIcon />
</CustomTooltip>
</div>
<div onClick={handleDeleteClick} data-testid={'delete-app-button'}>
<CustomTooltip text='Delete application details'>
<LabelPairedTrashSmRegularIcon />
Expand All @@ -32,9 +21,6 @@ const AppActionsCell = () => {
{isDeleteDialogOpen && (
<DeleteAppDialog onClose={() => setDeleteDialogOpen(false)} appId={0} />
)}
{isUpdateDialogOpen && (
<UpdateAppDialog onClose={() => setUpdateDialogOpen(false)} app={undefined} />
)}
</div>
);
};
Expand Down

0 comments on commit ab7c2e5

Please sign in to comment.