Skip to content

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

feat: show alert if user account is deleted

thecodrrab2444324f1b
diff --git a/apps/web/src/views/splash.js b/apps/web/src/views/splash.js
index 016af2cc0..5498fee0d 100644
--- a/apps/web/src/views/splash.js
+++ b/apps/web/src/views/splash.js
@@ -5,7 +5,8 @@ import Animated from "../components/animated";
import { db } from "../common";
import ProgressBar from "../components/progress-bar";
import { getRandom } from "../utils/random";
-import * as Sentry from "@sentry/react";
+import { EV } from "notes-core/common";
+//import * as Sentry from "@sentry/react";
const loadingLines = [
"Ejecting bumfuzzled notes",
@@ -21,13 +22,19 @@ function Splash(props) {
useEffect(() => {
(async function () {
try {
+ EV.subscribe("user:loggedOut", (reason) => {
+ if (reason) {
+ // TODO find a way to show this properly.
+ alert(reason);
+ }
+ });
await db.init();
setLoading(false);
} catch (e) {
- Sentry.captureException(e, (scope) => {
- scope.setExtra("where", "db.init");
- return scope;
- });
+ // Sentry.captureException(e, (scope) => {
+ // scope.setExtra("where", "db.init");
+ // return scope;
+ // });
console.error(e);
}
})();