From caec2ca309b6a3df32be2eaf3779f053f99ffca9 Mon Sep 17 00:00:00 2001 From: Wolfie <32025746+Wolfkid200444@users.noreply.github.com> Date: Sun, 10 Mar 2024 08:17:04 -0400 Subject: [PATCH] Update imports and add sort menu to NoteModal component --- .../holynotes/components/modals/Notebook.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/holynotes/components/modals/Notebook.tsx b/src/plugins/holynotes/components/modals/Notebook.tsx index 8b6a9a49f..a04dea3ac 100644 --- a/src/plugins/holynotes/components/modals/Notebook.tsx +++ b/src/plugins/holynotes/components/modals/Notebook.tsx @@ -8,7 +8,7 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { classes } from "@utils/misc"; import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { findByProps } from "@webpack"; -import { ContextMenuApi, Flex, Menu, React, TabBar, Text, TextInput } from "@webpack/common"; +import { ContextMenuApi, Flex, FluxDispatcher, Menu, React, TabBar, Text, TextInput } from "@webpack/common"; import noteHandler from "plugins/holynotes/noteHandler"; import { HolyNotes } from "plugins/holynotes/types"; @@ -72,7 +72,7 @@ export const NoteModal = (props: ModalProps & { onClose: () => void; }) => { return ( - +
@@ -131,7 +131,11 @@ export const NoteModal = (props: ModalProps & { onClose: () => void; }) => { className={quickSelect} onClick={(event: React.MouseEvent) => { ContextMenuApi.openContextMenu(event, () => ( - <> + FluxDispatcher.dispatch({ type: "CONTEXT_MENU_CLOSE" })} + aria-label="Sort Menu" + > void; }) => { setSortDirection(false); setSortType(false); }} /> - + + )); }} >