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 isTopic check fails in header title
Ammar Ahmedc84d78e951c1
diff --git a/apps/mobile/src/components/header/title.js b/apps/mobile/src/components/header/title.jsindex d27313248..00f5eb29c 100644--- a/apps/mobile/src/components/header/title.js+++ b/apps/mobile/src/components/header/title.js@@ -17,10 +17,14 @@ const titleState = {};export const Title = () => {const colors = useThemeStore(state => state.colors);const currentScreen = useNavigationStore(state => state.currentScreen);- const isTopic = currentScreen.type === 'topic';+ const isTopic = currentScreen?.name === 'TopicNotes';const [hide, setHide] = useState(isTopic ? true : false);const isHidden = titleState[currentScreen.id];- const notebook = isTopic ? db.notebooks?.notebook(currentScreen.notebookId)?.data : null;+ console.log(currentScreen, 'header');+ const notebook =+ isTopic && currentScreen.notebookId+ ? db.notebooks?.notebook(currentScreen.notebookId)?.data+ : null;const title = currentScreen.title;const isTag = title.slice(0, 1) === '#';