mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-07 00:15:23 +02:00
cleaned the added hook
This commit is contained in:
parent
a65e1c434e
commit
ae6a4cd0fe
1 changed files with 1 additions and 7 deletions
|
|
@ -19,17 +19,11 @@ export default function useManualCopyToClipboard(
|
|||
|
||||
// Create a temporary container for the selected content
|
||||
const tempDiv = document.createElement('div');
|
||||
<<<<<<< HEAD
|
||||
const range = selection.rangeCount > 0 ? selection.getRangeAt(0) : null;
|
||||
const clonedSelection = range ? range.cloneContents() : null;
|
||||
if (clonedSelection) {
|
||||
tempDiv.appendChild(clonedSelection);
|
||||
}
|
||||
=======
|
||||
const range = selection.getRangeAt(0);
|
||||
const clonedSelection = range.cloneContents();
|
||||
tempDiv.appendChild(clonedSelection);
|
||||
>>>>>>> d8de1fcd4f2f1b2de302378d16e5dcf6cfdf9ceb
|
||||
|
||||
const stripInlineStyles = (element: Element) => {
|
||||
// Remove style attribute (the main culprit for bloat)
|
||||
|
|
@ -99,5 +93,5 @@ export default function useManualCopyToClipboard(
|
|||
return () => {
|
||||
container.removeEventListener('copy', handleManualCopy);
|
||||
};
|
||||
}, [containerRef, messageData.text, messageData.content, messageData.searchResults]);
|
||||
}, [containerRef]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue