diff --git a/src/plugins/holynotes/components/modals/Notebook.tsx b/src/plugins/holynotes/components/modals/Notebook.tsx index 91b88776f..946f6dee5 100644 --- a/src/plugins/holynotes/components/modals/Notebook.tsx +++ b/src/plugins/holynotes/components/modals/Notebook.tsx @@ -4,16 +4,17 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import ErrorBoundary from "@components/ErrorBoundary"; import { Flex } from "@components/Flex"; import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalRoot, openModal } from "@utils/modal"; import { React, TabBar, Text, TextInput } from "@webpack/common"; import noteHandler from "plugins/holynotes/noteHandler"; + import HelpIcon from "../icons/HelpIcon"; -import ErrorBoundary from "@components/ErrorBoundary"; -export const NoteModal = async (props) => { +export const NoteModal = (props) => { const [sortType, setSortType] = React.useState(true); const [searchInput, setSearch] = React.useState(""); const [sortDirection, setSortDirection] = React.useState(true); @@ -25,52 +26,54 @@ export const NoteModal = async (props) => { if (!notes) return <>; return ( - - -
- - - NOTEBOOK - -
openModal()}> - + + + +
+ + + NOTEBOOK + +
openModal()}> + +
+
+ setSearch(e)} + /> +
+ +
+
+ + {Object.keys(noteHandler.getAllNotes()).map(notebook => ( + + {notebook} + + ))} +
-
- setSearch(e)} - /> -
- - -
- - {Object.keys(await noteHandler.getAllNotes()).map(notebook => ( - - {notebook} - - ))} -
-
- - - {} - - -
- + + + { } + + + + - -
+ + +
); }; diff --git a/src/plugins/holynotes/noteHandler.ts b/src/plugins/holynotes/noteHandler.ts index a4dc4f46d..7e0a4dafa 100644 --- a/src/plugins/holynotes/noteHandler.ts +++ b/src/plugins/holynotes/noteHandler.ts @@ -46,8 +46,9 @@ export default new (class NoteHandler { } public async getAllNotes(): Promise { - // Needs fucking fixing for fuck sakes VEN GIVE ME IMAGE PERMS - return { ...await DataStore.values(HolyNoteStore) } ; + const data = await DataStore.values(HolyNoteStore); + const mainData = data[0]; + return mainData; } public addNote = async (message: Message, notebook: string) => {