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
fix notebook not loading in list
ammarahm-ed41c8a8367039
diff --git a/apps/mobile/src/components/NotebookItem/index.js b/apps/mobile/src/components/NotebookItem/index.jsindex 370a85b99..aaf73fa1d 100644--- a/apps/mobile/src/components/NotebookItem/index.js+++ b/apps/mobile/src/components/NotebookItem/index.js@@ -1,23 +1,21 @@import React from 'react';import {Text, TouchableOpacity, View} from 'react-native';-import Icon from 'react-native-vector-icons/MaterialCommunityIcons';import {useTracked} from '../../provider';import NavigationService from '../../services/Navigation';import {ActionSheetEvent} from '../DialogManager/recievers';import Seperator from '../Seperator';import {ph, pv, SIZE, WEIGHT} from "../../utils/SizeUtils";+import {ActionIcon} from "../ActionIcon";export const NotebookItem = ({item,- hideMore = false,isTopic = false,notebookID,- numColumns,isTrash,customStyle,}) => {- const [state, dispatch] = useTracked();- const {colors, selectedItemsList} = state;+ const [state,] = useTracked();+ const {colors,} = state;return (<Viewdiff --git a/apps/mobile/src/components/SimpleList/NotebookItemWrapper.js b/apps/mobile/src/components/SimpleList/NotebookItemWrapper.jsindex 7f33bf8b6..b4ea00cba 100644--- a/apps/mobile/src/components/SimpleList/NotebookItemWrapper.js+++ b/apps/mobile/src/components/SimpleList/NotebookItemWrapper.js@@ -12,8 +12,7 @@ export const NotebookItemWrapper = ({pinned = false,}) => {const [state, dispatch] = useTracked();- const {selectionMode, preventDefaultMargins, headerState} = state;- let params = headerState.route.params || {};+ const {selectionMode, preventDefaultMargins} = state;const style = useMemo(() => {return {width: selectionMode ? '90%' : '100%', marginHorizontal: 0};@@ -76,7 +75,6 @@ export const NotebookItemWrapper = ({hideMore={preventDefaultMargins}isTopic={item.type === 'topic'}customStyle={style}- noteToMove={params.note}item={item}index={index}isTrash={isTrash}diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.jsindex d18b07d65..3491fba03 100644--- a/apps/mobile/src/components/SimpleList/index.js+++ b/apps/mobile/src/components/SimpleList/index.js@@ -58,9 +58,7 @@ const SimpleList = ({: listData;let d = [header, ...mainData];- /* for (var i = 0; i < 10000; i++) {- d = [...d,...data];- } */+ console.log(d,"D");setDataProvider(dataProvider.cloneWithRows(d),);@@ -137,6 +135,7 @@ const SimpleList = ({return dataProvider.getDataForIndex(index).type;},(type, dim) => {+ console.log(type);switch (type) {case 'note':dim.width = width;@@ -176,13 +175,14 @@ const SimpleList = ({switch (type) {case 'note':return <RenderItem item={data} pinned={data.pinned} index={index}/>;+ case 'notebook':+ return <RenderItem item={data} pinned={data.pinned} index={index}/>;case 'MAIN_HEADER':return <ListHeaderComponent type={dataType} data={listData}/>;case 'header':return <RenderSectionHeader item={data}/>;default:- sreturn null;}};diff --git a/apps/mobile/src/views/Folders/index.js b/apps/mobile/src/views/Folders/index.jsindex e8d4a5b1f..655b95a16 100644--- a/apps/mobile/src/views/Folders/index.js+++ b/apps/mobile/src/views/Folders/index.js@@ -6,6 +6,8 @@ import {NotebookItemWrapper} from '../../components/SimpleList/NotebookItemWrappimport {useTracked} from '../../provider';import {Actions} from '../../provider/Actions';import {ContainerBottomButton} from '../../components/Container/ContainerBottomButton';+import note from "notes-core/models/note";+import notebook from "notes-core/models/notebook";export const Folders = ({route, navigation}) => {const [state, dispatch] = useTracked();const {notebooks} = state;@@ -48,7 +50,7 @@ export const Folders = ({route, navigation}) => {type: Actions.CURRENT_SCREEN,screen: 'notebooks',});-+ console.log(notebooks)}, []);useEffect(() => {@@ -87,8 +89,6 @@ export const Folders = ({route, navigation}) => {focused={() => navigation.isFocused()}RenderItem={NotebookItemWrapper}placeholder={<Placeholder type="notebooks" />}- pinned={true}- placeholderText="Notebooks you add will appear here"/><ContainerBottomButtontitle="Create a new notebook"