feat: add "Hello from the otter side" easter eggs

Custom 404 pages for landing and docs sites, otter greeting on the
first-login sidebar, and a one-time welcome toast after password change.
This commit is contained in:
SnapOtter
2026-05-16 22:45:22 +08:00
parent b5db8f3192
commit fd69a60e48
5 changed files with 94 additions and 3 deletions
+10 -1
View File
@@ -1,7 +1,7 @@
import { APP_VERSION, en, shouldShowConsent } from "@snapotter/shared";
import { Component, type ErrorInfo, lazy, type ReactNode, Suspense, useEffect } from "react";
import { BrowserRouter, Navigate, Route, Routes, useLocation } from "react-router-dom";
import { Toaster } from "sonner";
import { Toaster, toast } from "sonner";
import { ConnectionMonitor } from "./components/common/connection-monitor";
import { KeyboardShortcutProvider } from "./components/common/keyboard-shortcut-provider";
import { I18nProvider } from "./contexts/i18n-context";
@@ -186,6 +186,15 @@ export function App() {
fetchAnalyticsConfig();
}, [fetchAnalyticsConfig]);
useEffect(() => {
if (localStorage.getItem("snapotter-welcome") === "1") {
localStorage.removeItem("snapotter-welcome");
toast("Hello from the otter side! 🦦", {
duration: 5000,
});
}
}, []);
useEffect(() => {
if (
!analyticsConfigLoaded ||