A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: fix note counts not updating in notebooks list
Abdullah Atta81b291ae37a1
diff --git a/apps/web/src/components/notebook/index.tsx b/apps/web/src/components/notebook/index.tsxindex e1f07044b..67caaa363 100644--- a/apps/web/src/components/notebook/index.tsx+++ b/apps/web/src/components/notebook/index.tsx@@ -65,10 +65,12 @@ export function Notebook(props: NotebookProps) {refresh = () => {},depth = 0} = props;- const isOpened = useNotesStore(- (store) =>- store.context?.type === "notebook" && store.context.id === item.id+ const currentContext = useNotesStore((store) =>+ store.context?.type === "notebook" && store.context.id === item.id+ ? store.contextNotes+ : null);+ const isOpened = !!currentContext;const dragTimeout = useRef(0);const { isDragEntering, isDragLeaving } = useDragHandler(`id_${item.id}`);@@ -154,7 +156,11 @@ export function Notebook(props: NotebookProps) {</Text></Flex>}- footer={<Text variant="subBody">{totalNotes}</Text>}+ footer={+ <Text variant="subBody">+ {currentContext ? currentContext?.length : totalNotes}+ </Text>+ }menuItems={notebookMenuItems}context={{ refresh }}sx={{