diff --git a/packages/web/components/templates/article/ArticleContainer.tsx b/packages/web/components/templates/article/ArticleContainer.tsx index 62dd87e01..17b78384d 100644 --- a/packages/web/components/templates/article/ArticleContainer.tsx +++ b/packages/web/components/templates/article/ArticleContainer.tsx @@ -320,13 +320,6 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element { readerTableHeaderColor: theme.colors.readerTableHeader.toString(), readerHeadersColor: theme.colors.readerFont.toString(), } - console.log( - 'currentTheme from iOS: ', - highContrastText, - currentTheme(), - 'readerFontColor', - styles.readerFontColor - ) const recommendationsWithNotes = useMemo(() => { return ( diff --git a/packages/web/components/templates/article/HighlightViewItem.tsx b/packages/web/components/templates/article/HighlightViewItem.tsx index 5b9effade..fa9f71550 100644 --- a/packages/web/components/templates/article/HighlightViewItem.tsx +++ b/packages/web/components/templates/article/HighlightViewItem.tsx @@ -17,7 +17,6 @@ type HighlightViewItemProps = { viewInReader: (highlightId: string) => void - deleteHighlightAction: () => void updateHighlight: (highlight: Highlight) => void setSetLabelsTarget: (highlight: Highlight) => void diff --git a/packages/web/components/templates/article/HighlightsLayer.tsx b/packages/web/components/templates/article/HighlightsLayer.tsx index 1859882af..21c06712f 100644 --- a/packages/web/components/templates/article/HighlightsLayer.tsx +++ b/packages/web/components/templates/article/HighlightsLayer.tsx @@ -289,7 +289,6 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element { if (!target || (target as Node)?.nodeType !== Node.ELEMENT_NODE) { console.log(' -- returning early from page tap') - return } @@ -399,18 +398,15 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element { (updatedHighlights: Highlight[], deletedHighlights: Highlight[]) => { props.setShowHighlightsModal(false) - setHighlights(updatedHighlights) - + // Remove all the existing highlights, then set the new ones removeHighlights( - deletedHighlights.map((h) => h.id), + highlights.map((h) => h.id), highlightLocations ) - updatedHighlights.forEach((h) => { - updateHighlightsCallback(h) - }) + setHighlights([...updatedHighlights]) }, - [highlightLocations, props, updateHighlightsCallback] + [highlights, highlightLocations, props, setHighlights] ) useEffect(() => { @@ -675,12 +671,6 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element { } } - console.log( - 'going to show the higlight bar: ', - focusedHighlightMousePos.current?.pageY, - selectionData?.focusPosition - ) - return ( <> ) - } else { - console.log( - 'not showing the higlight bar: ', - focusedHighlight, - selectionData - ) } if (props.showHighlightsModal) { diff --git a/packages/web/components/templates/article/Notebook.tsx b/packages/web/components/templates/article/Notebook.tsx index 37ee8a531..e657356d2 100644 --- a/packages/web/components/templates/article/Notebook.tsx +++ b/packages/web/components/templates/article/Notebook.tsx @@ -121,8 +121,6 @@ export function Notebook(props: NotebookProps): JSX.Element { } case 'DELETE_HIGHLIGHT': { const highlightId = action.deleteHighlightId - console.log(' DELETE_HIGHLIGHT: ', highlightId) - if (!highlightId) { throw new Error('No highlightId for delete action.') } @@ -318,12 +316,6 @@ export function Notebook(props: NotebookProps): JSX.Element { viewInReader={props.viewInReader} setSetLabelsTarget={setLabelsTarget} setShowConfirmDeleteHighlightId={setShowConfirmDeleteHighlightId} - deleteHighlightAction={() => { - dispatchAnnotations({ - type: 'DELETE_HIGHLIGHT', - deleteHighlightId: highlight.id, - }) - }} updateHighlight={() => { dispatchAnnotations({ type: 'UPDATE_HIGHLIGHT',