From f6622bc95938c2b6d6cb8e987180108ac8650b23 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 1 Feb 2023 17:04:14 +0800 Subject: [PATCH] Remove some debug code --- .../templates/article/HighlightsLayer.tsx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/web/components/templates/article/HighlightsLayer.tsx b/packages/web/components/templates/article/HighlightsLayer.tsx index 4dda397db..fc1fbaaff 100644 --- a/packages/web/components/templates/article/HighlightsLayer.tsx +++ b/packages/web/components/templates/article/HighlightsLayer.tsx @@ -444,23 +444,6 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element { ] ) - useEffect(() => { - ;(async () => { - if ( - 'enableSelectToHighlight' in window && - window.enableSelectToHighlight && - selectionData - ) { - // console.log('auto highlight: ', selectionData.selection.toString()) - await createHighlightCallback('none', undefined) - selectionData.selection.collapseToStart() - // handleClickHighlight(selectionData.mouseEvent) - // setSelectionData(null) - // window.getSelection()?.removeAllRanges() - } - })() - }, [selectionData, setSelectionData]) - const dispatchHighlightError = (action: string, error: unknown) => { if (props.isAppleAppEmbed) { window?.webkit?.messageHandlers.highlightAction?.postMessage({