import { A, Route, Router, useNavigate } from "@solidjs/router";
import { createEffect, Show, Suspense, type Component } from "solid-js";
import { DmId, GroupId, Home, Overview, preloadDmId, Privacy } from "./pages";
import "./app.css";
import { MetaProvider } from "@solidjs/meta";
import { Portal } from "solid-js/web";
import { Callout, CalloutTitle, CalloutContent } from "./components/ui/callout";
import { dbLoaded } from "./db";
import { hasCashedData } from "./lib/db-cache";
import { isWasmSupported } from "./lib/utils";
import { ColorModeProvider, ColorModeScript, createLocalStorageManager } from "@kobalte/core";
import { ModeToggle } from "./components/ui/mode-toggle";
const NO_DATA_NEEDED_PAGES = ["/", "/privacy"];
const App: Component = () => {
const storageManager = createLocalStorageManager("vite-ui-theme");
return (
{
const navigate = useNavigate();
createEffect(() => {
if (!dbLoaded() && !hasCashedData() && !NO_DATA_NEEDED_PAGES.includes(props.location.pathname)) {
navigate("/");
}
});
const wasmSupport = isWasmSupported();
return (
<>
Your browser does not support WebAssembly, which is required for this site to work with the
big amount of data a signal backup contains.
Please try a different browser.
There is currently no backup database loaded, but you can watch statistics that have been
cached, meaning only chats you already opened or chats that were preloaded.
{
umami.track("Watch cached statistics");
}}
>
Watch cached statistics
}
>
You are watching cached statistics
Currently there is no backup database loaded. You can only watch statistics that have been
cached, meaning only chats you already opened or chats that were preloaded.
Load a backup
{props.children}
>
);
}}
>
{" "}
);
};
export default App;