feat: start FAQ page

This commit is contained in:
2024-01-20 22:24:57 +00:00
parent a3ab088a82
commit 96467bd979
7 changed files with 141 additions and 100 deletions

View File

@ -27,8 +27,12 @@ import { WidgetsPage } from "@/pages/widgets";
import { AlertsPage } from "@/pages/alerts";
import { StreamSummaryPage } from "@/pages/summary";
import { EmbededPage } from "./pages/embed";
import Markdown from "./element/markdown";
const DashboardPage = lazy(() => import("./pages/dashboard"));
import Faq from "@/faq.md";
import { Async } from "./element/async-loader";
const db = new SnortSystemDb();
const System = new NostrSystem({
db,
@ -103,6 +107,13 @@ const router = createBrowserRouter([
</Suspense>
),
},
{
path: "/faq",
element: <Async loader={async () => {
const req = await fetch(Faq);
return await req.text();
}} then={(v) => <Markdown content={v} tags={[]} plainText={true} />} />
},
{
path: "*",
element: <CatchAllRoutePage />,