Skip to content

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

feat: re-enable signup screen on first startup

thecodrra2a09954236b
diff --git a/apps/web/src/index.js b/apps/web/src/index.js
index 6f159c607..7829a170f 100644
--- a/apps/web/src/index.js
+++ b/apps/web/src/index.js
@@ -24,12 +24,19 @@ const ROUTES = {
// component: () => import("./views/auth"),
// props: { type: "recover" },
// },
- default: { component: () => import("./app"), props: {} },
+ "/": { component: () => import("./app"), props: {} },
};
function getRoute() {
const path = getCurrentPath();
- return ROUTES[path] || ROUTES.default;
+ if (!ROUTES[path]) {
+ return shouldSkipInitiation() ? ROUTES["/"] : ROUTES["/signup"];
+ }
+ return ROUTES[path];
+}
+
+function shouldSkipInitiation() {
+ return localStorage.getItem("skipInitiation") || false;
}
const route = getRoute();