refactor: upgrade snort pkgs

This commit is contained in:
2023-10-16 23:05:37 +01:00
parent d9bcea518b
commit b36c305a53
57 changed files with 389 additions and 1094 deletions

View File

@ -6,6 +6,7 @@ import React from "react";
import ReactDOM from "react-dom/client";
import { NostrSystem } from "@snort/system";
import { SnortContext } from "@snort/system-react";
import { SnortSystemDb } from "@snort/system-web";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import { RootPage } from "pages/root";
@ -30,7 +31,11 @@ export enum StreamState {
Planned = "planned",
}
export const System = new NostrSystem({});
const db = new SnortSystemDb();
const System = new NostrSystem({
db,
checkSigs: false,
});
export const Login = new LoginStore();
register();
@ -44,6 +49,7 @@ const router = createBrowserRouter([
{
element: <LayoutPage />,
loader: async () => {
db.ready = await db.isAvailable();
await System.Init();
return null;
},
@ -86,6 +92,7 @@ const router = createBrowserRouter([
path: "/chat/:id",
element: <ChatPopout />,
loader: async () => {
db.ready = await db.isAvailable();
await System.Init();
return null;
},
@ -94,6 +101,7 @@ const router = createBrowserRouter([
path: "/alert/:id/:type",
element: <AlertsPage />,
loader: async () => {
db.ready = await db.isAvailable();
await System.Init();
return null;
},