2023-06-30 14:05:57 +00:00
|
|
|
/** @jsx h */
|
2023-09-06 16:29:27 +00:00
|
|
|
import { h, render } from "https://esm.sh/preact@10.17.1";
|
2023-11-02 13:10:16 +00:00
|
|
|
import { NavBar } from "./nav.tsx";
|
|
|
|
import { InMemoryAccountContext } from "../lib/nostr-ts/nostr.ts";
|
2023-11-16 13:22:18 +00:00
|
|
|
import { Datebase_View } from "../database.ts";
|
2023-11-02 13:10:16 +00:00
|
|
|
import { fail } from "https://deno.land/std@0.176.0/testing/asserts.ts";
|
2023-11-17 07:06:11 +00:00
|
|
|
import { testEventBus, testEventMarker, testEventsAdapter, testRelayAdapter } from "./_setup.test.ts";
|
2023-06-30 14:05:57 +00:00
|
|
|
import { tw } from "https://esm.sh/twind@0.16.16";
|
|
|
|
|
2023-11-17 07:50:53 +00:00
|
|
|
const db = await test_db_view();
|
2023-11-16 13:22:18 +00:00
|
|
|
|
2023-11-02 13:10:16 +00:00
|
|
|
const ctx = InMemoryAccountContext.Generate();
|
2023-06-30 14:05:57 +00:00
|
|
|
|
2023-11-02 13:10:16 +00:00
|
|
|
render(
|
|
|
|
<div class={tw`h-screen`}>
|
|
|
|
<NavBar emit={testEventBus.emit} publicKey={ctx.publicKey} profileGetter={db} />
|
|
|
|
<NavBar emit={testEventBus.emit} publicKey={ctx.publicKey} profileGetter={db} isMobile={true} />
|
|
|
|
</div>,
|
|
|
|
document.body,
|
|
|
|
);
|
2023-06-30 14:05:57 +00:00
|
|
|
|
2023-11-02 13:10:16 +00:00
|
|
|
for await (const event of testEventBus.onChange()) {
|
|
|
|
console.log(event);
|
2023-06-30 14:05:57 +00:00
|
|
|
}
|