diff --git a/src/components/common/TicketEditor/TicketEditor.tsx b/src/components/common/TicketEditor/TicketEditor.tsx index ed69d39c..0dc700f9 100644 --- a/src/components/common/TicketEditor/TicketEditor.tsx +++ b/src/components/common/TicketEditor/TicketEditor.tsx @@ -208,6 +208,29 @@ const TicketEditor = observer( } }; + const handleCopy = async () => { + try { + await navigator.clipboard.writeText(versionTicketData.description); + setToasts([ + { + id: `${Date.now()}-copy-success`, + title: 'Hive', + color: 'success', + text: 'Description copied to clipboard!' + } + ]); + } catch (err) { + setToasts([ + { + id: `${Date.now()}-copy-error`, + title: 'Hive', + color: 'danger', + text: 'Failed to copy description' + } + ]); + } + }; + return ( @@ -238,6 +261,14 @@ const TicketEditor = observer( Version {selectedVersion} + + Copy +