From cb054dcf4282bc9938cd60b4454db23fc7a12fc4 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Tue, 27 Jun 2023 15:48:55 +0800 Subject: [PATCH] Use mutate as effect hook --- packages/web/components/templates/article/HighlightsLayer.tsx | 1 - packages/web/components/templates/article/Notebook.tsx | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/web/components/templates/article/HighlightsLayer.tsx b/packages/web/components/templates/article/HighlightsLayer.tsx index a5705c2d5..29a4b5594 100644 --- a/packages/web/components/templates/article/HighlightsLayer.tsx +++ b/packages/web/components/templates/article/HighlightsLayer.tsx @@ -19,7 +19,6 @@ import { HighlightBar, HighlightAction } from '../../patterns/HighlightBar' import { removeHighlights } from '../../../lib/highlights/deleteHighlight' import { createHighlight } from '../../../lib/highlights/createHighlight' import { HighlightNoteModal } from './HighlightNoteModal' -import { NotebookModal } from './NotebookModal' import { showErrorToast, showSuccessToast } from '../../../lib/toastHelpers' import { ArticleMutations } from '../../../lib/articleActions' import { isTouchScreenDevice } from '../../../lib/deviceType' diff --git a/packages/web/components/templates/article/Notebook.tsx b/packages/web/components/templates/article/Notebook.tsx index e70dbc56c..f511c6e8a 100644 --- a/packages/web/components/templates/article/Notebook.tsx +++ b/packages/web/components/templates/article/Notebook.tsx @@ -216,9 +216,7 @@ export function NotebookContent(props: NotebookContentProps): JSX.Element { return () => { document.removeEventListener('highlightsUpdated', highlightsUpdated) } - }, [forceUpdate]) - - console.log('articleData: ', articleData) + }, [mutate]) return (