new parser, faster than before 50%

This commit is contained in:
Ren Amamiya
2023-09-04 14:05:04 +07:00
parent 5d45027776
commit 3ebcf4a981
27 changed files with 162 additions and 181 deletions

View File

@@ -23,7 +23,7 @@ export function useEvent(id: string, embed?: string) {
// get event from relay if event in db not present
const event = await ndk.fetchEvent(id);
if (!event) throw new Error(`Event not found: ${id}`);
if (!event) throw new Error(`Event not found: ${id.toString()}`);
let root: string;
let reply: string;
@@ -50,10 +50,8 @@ export function useEvent(id: string, embed?: string) {
},
{
enabled: !!ndk,
staleTime: Infinity,
refetchOnMount: false,
refetchOnWindowFocus: false,
refetchOnReconnect: false,
}
);