Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: going to accounts page when logged out causes crash

thecodrr7e1ffb60200d
diff --git a/apps/web/src/views/Settings.js b/apps/web/src/views/Settings.js
index ab9b08b23..89e541685 100644
--- a/apps/web/src/views/Settings.js
+++ b/apps/web/src/views/Settings.js
@@ -5,6 +5,7 @@ import { useStore as useUserStore } from "../stores/user-store";
import { useStore as useThemeStore } from "../stores/theme-store";
import AccentItem from "../components/accent-item";
import accents from "../theme/accents";
+import { showLogInDialog } from "../components/dialogs/logindialog";
function Settings(props) {
const theme = useThemeStore((store) => store.theme);
@@ -18,7 +19,13 @@ function Settings(props) {
bg="shade"
p={2}
sx={{ borderRadius: "default", cursor: "pointer" }}
- onClick={() => props.navigator.navigate("account")}
+ onClick={async () => {
+ if (isLoggedIn) {
+ props.navigator.navigate("account");
+ } else {
+ await showLogInDialog();
+ }
+ }}
>
<Flex
variant="columnCenter"