From 10c8348f1a0f3bc9c516ac3cd27325dc6f42973a Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 24 Mar 2023 20:42:56 +0800 Subject: [PATCH] Update notes modal in PDFContainer --- .../templates/article/PdfArticleContainer.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/web/components/templates/article/PdfArticleContainer.tsx b/packages/web/components/templates/article/PdfArticleContainer.tsx index f9cde6cb7..6a36b6a4c 100644 --- a/packages/web/components/templates/article/PdfArticleContainer.tsx +++ b/packages/web/components/templates/article/PdfArticleContainer.tsx @@ -495,14 +495,9 @@ export default function PdfArticleContainer( key={notebookKey} pageId={props.article.id} highlights={highlightsRef.current} - onOpenChange={() => props.setShowHighlightsModal(false)} - /* eslint-disable @typescript-eslint/no-empty-function */ - updateHighlight={() => {}} - deleteHighlightAction={(highlightId: string) => { - const event = new CustomEvent('deleteHighlightbyId', { - detail: highlightId, - }) - document.dispatchEvent(event) + onClose={(updatedHighlights, deletedAnnotations) => { + console.log('closed PDF notebook: ') + props.setShowHighlightsModal(false) }} /> )}