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: use hardNavigate to go to the main page
thecodrrc65b4e131a81
diff --git a/apps/web/src/common/key-map.js b/apps/web/src/common/key-map.jsindex b1e75f392..d1982b036 100644--- a/apps/web/src/common/key-map.js+++ b/apps/web/src/common/key-map.js@@ -51,7 +51,7 @@ const KEYMAP = [global: false,action: (e) => {e.preventDefault();- navigate("/");+ navigate("/notes");},},{diff --git a/apps/web/src/views/auth.js b/apps/web/src/views/auth.jsindex 4d48d747d..9f17b8177 100644--- a/apps/web/src/views/auth.js+++ b/apps/web/src/views/auth.js@@ -215,7 +215,7 @@ function Auth(props) {title="Go to app"onClick={() => {Config.set("skipInitiation", true);- navigate("/");+ hardNavigate("/");}}><ArrowRight size={16} />diff --git a/apps/web/src/views/recovery.js b/apps/web/src/views/recovery.jsindex c379b6a49..8752f6027 100644--- a/apps/web/src/views/recovery.js+++ b/apps/web/src/views/recovery.js@@ -1,6 +1,6 @@import React, { useEffect, useMemo, useState } from "react";import { Button, Flex, Image, Text } from "rebass";-import { useQueryParams } from "../navigation";+import { hardNavigate, useQueryParams } from "../navigation";import ThemeProvider from "../components/theme-provider";import Field from "../components/field";import * as Icon from "../components/icons";@@ -49,7 +49,7 @@ function useAuthenticateUser({ code, userId, performAction }) {performAction({message: "Authenticating. Please wait...",error: "Failed to authenticate. Please try again.",- onError: () => navigate("/"),+ onError: () => hardNavigate("/"),action: authenticateUser,});@@ -77,7 +77,7 @@ function AccountRecovery() {const Step = useMemo(() => steps[step], [step]);useAuthenticateUser({ code, userId, performAction });useEffect(() => {- if (!code || !userId) return navigate("/");+ if (!code || !userId) return hardNavigate("/");}, [code, userId]);return (diff --git a/apps/web/src/views/search.js b/apps/web/src/views/search.jsindex 572f552a7..186792d61 100644--- a/apps/web/src/views/search.js+++ b/apps/web/src/views/search.js@@ -8,7 +8,7 @@ import { useStore as useNoteStore } from "../stores/note-store";import { Flex, Text } from "rebass";import { showToast } from "../utils/toast";import { store as notebookstore } from "../stores/notebook-store";-import { navigate } from "../navigation";+import { hardNavigate, navigate } from "../navigation";async function typeToItems(type, context) {switch (type) {@@ -77,7 +77,7 @@ function Search({ type }) {}}, [type, context]);- if (!title) return navigate("/");+ if (!title) return hardNavigate("/");return (<>