File tree Expand file tree Collapse file tree 2 files changed +16
-172
lines changed
app/(org)/dashboard/caps/components Expand file tree Collapse file tree 2 files changed +16
-172
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- "use client" ;
2-
31import {
42 DropdownMenu ,
53 DropdownMenuContent ,
64 DropdownMenuItem ,
75 DropdownMenuTrigger ,
86} from "@cap/ui" ;
97import {
10- faCopy ,
118 faEllipsis ,
129 faPencil ,
1310 faTrash ,
1411} from "@fortawesome/free-solid-svg-icons" ;
1512import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
1613import { RefObject } from "react" ;
17- import { toast } from "sonner" ;
18- import { duplicateFolder } from "@/actions/folders/duplicateFolder" ;
19- import { useDashboardContext } from "../../Contexts" ;
2014
2115interface FoldersDropdownProps {
2216 id : string ;
@@ -27,13 +21,10 @@ interface FoldersDropdownProps {
2721}
2822
2923export const FoldersDropdown = ( {
30- id,
31- parentId,
3224 setIsRenaming,
3325 setConfirmDeleteFolderOpen,
3426 nameRef,
3527} : FoldersDropdownProps ) => {
36- const { activeSpace } = useDashboardContext ( ) ;
3728 return (
3829 < div
3930 onClick = { ( e ) => e . stopPropagation ( ) }
@@ -72,22 +63,22 @@ export const FoldersDropdown = ({
7263 } ,
7364 } ,
7465 // Only show Duplicate if there is NO active space
75- ...( ! activeSpace
76- ? [
77- {
78- label : "Duplicate" ,
79- icon : faCopy ,
80- onClick : async ( ) => {
81- try {
82- await duplicateFolder ( id , parentId ) ;
83- toast . success ( "Folder duplicated successfully" ) ;
84- } catch ( error ) {
85- toast . error ( "Failed to duplicate folder" ) ;
86- }
87- } ,
88- } ,
89- ]
90- : [ ] ) ,
66+ // ...(!activeSpace
67+ // ? [
68+ // {
69+ // label: "Duplicate",
70+ // icon: faCopy,
71+ // onClick: async () => {
72+ // try {
73+ // await duplicateFolder(id, parentId);
74+ // toast.success("Folder duplicated successfully");
75+ // } catch (error) {
76+ // toast.error("Failed to duplicate folder");
77+ // }
78+ // },
79+ // },
80+ // ]
81+ // : []),
9182 {
9283 label : "Delete" ,
9384 icon : faTrash ,
You can’t perform that action at this time.
0 commit comments