Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions apps/frontend/app/admin/_components/table/DataTableDeleteButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,33 +92,33 @@ export function DataTableDeleteButton<TData extends { id: number }, TPromise>({
}

return (
<AlertModal
trigger={
<Button
variant="outline"
type="button"
onClick={handleDeleteButtonClick}
className={className}
>
<FaTrash fontSize={13} color={'#8A8A8A'} />
</Button>
}
open={isDialogOpen}
onOpenChange={setIsDialogOpen}
type={'warning'}
showIcon={!deleteItems}
title={`Delete ${target}?`}
primaryButton={{
text: 'Delete',
onClick: handleDeleteRows
}}
{...(deleteItems
? {}
: {
description: `Are you sure you want to permanently delete ${table.getSelectedRowModel().rows.length} ${target}(s)?`
})}
>
{deleteItems && <ModalList items={deleteItems} />}
</AlertModal>
<>
<Button
variant="outline"
type="button"
onClick={handleDeleteButtonClick}
className={className}
>
<FaTrash fontSize={13} color={'#8A8A8A'} />
</Button>
Comment thread
seoeun9 marked this conversation as resolved.
<AlertModal
open={isDialogOpen}
onOpenChange={setIsDialogOpen}
type={'warning'}
showIcon={!deleteItems}
title={`Delete ${target}?`}
primaryButton={{
text: 'Delete',
onClick: handleDeleteRows
}}
{...(deleteItems
? {}
: {
description: `Are you sure you want to permanently delete ${table.getSelectedRowModel().rows.length} ${target}(s)?`
})}
Comment thread
seoeun9 marked this conversation as resolved.
>
{deleteItems && <ModalList items={deleteItems} />}
</AlertModal>
</>
)
}
Loading