Delete modal fixed
This commit is contained in:
parent
8448d8ea95
commit
e4f6aed2f6
3 changed files with 22 additions and 9 deletions
|
|
@ -179,6 +179,7 @@ export default function CollectionCardComponent({
|
|||
onConfirm={() => {
|
||||
onDelete();
|
||||
}}
|
||||
description={name}
|
||||
>
|
||||
<IconComponent
|
||||
name="Trash2"
|
||||
|
|
@ -239,6 +240,7 @@ export default function CollectionCardComponent({
|
|||
onConfirm={() => {
|
||||
onDelete();
|
||||
}}
|
||||
description={name}
|
||||
>
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { Button } from "../../components/ui/button";
|
|||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
|
|
@ -26,22 +25,27 @@ export default function DeleteConfirmationModal({
|
|||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
<div className="flex">
|
||||
Delete <Trash2 className="ml-3 h-4 w-4" strokeWidth={1.5} />
|
||||
<div className="flex items-center">
|
||||
<span className="pr-2">Delete</span>
|
||||
<Trash2
|
||||
className="h-6 w-6 pl-1 text-foreground"
|
||||
strokeWidth={1.5}
|
||||
/>
|
||||
</div>
|
||||
</DialogTitle>
|
||||
<DialogDescription>
|
||||
Are you sure you want to delete this {description ?? "component"}?
|
||||
<br></br>
|
||||
This action cannot be undone.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<span>
|
||||
Are you sure you want to delete this {description ?? "component"}?
|
||||
<br></br>
|
||||
This action cannot be undone.
|
||||
</span>
|
||||
<DialogFooter>
|
||||
<DialogClose>
|
||||
<Button className="mr-3">Cancel</Button>
|
||||
|
||||
<Button
|
||||
type="submit"
|
||||
variant="destructive"
|
||||
onClick={() => {
|
||||
onConfirm();
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,14 @@ export default function ComponentsComponent({
|
|||
e.preventDefault();
|
||||
if (e.dataTransfer.types.some((types) => types === "Files")) {
|
||||
if (e.dataTransfer.files.item(0).type === "application/json") {
|
||||
uploadFlow(true, e.dataTransfer.files.item(0)!);
|
||||
try {
|
||||
uploadFlow(true, e.dataTransfer.files.item(0)!);
|
||||
} catch (error: any) {
|
||||
setErrorData({
|
||||
title: "Error uploading file",
|
||||
list: [error.message],
|
||||
});
|
||||
}
|
||||
} else {
|
||||
setErrorData({
|
||||
title: "Invalid file type",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue