polish
This commit is contained in:
@@ -21,7 +21,7 @@ export function useEvent(id: string, fallback?: string) {
|
||||
embed.pubkey,
|
||||
embed.kind,
|
||||
embed.tags,
|
||||
embed.content,
|
||||
embed.content as unknown as string,
|
||||
embed.created_at
|
||||
);
|
||||
return embed;
|
||||
@@ -42,7 +42,7 @@ export function useEvent(id: string, fallback?: string) {
|
||||
// @ts-ignore
|
||||
event['content'] = parser(event);
|
||||
}
|
||||
return event as LumeEvent;
|
||||
return event as unknown as LumeEvent;
|
||||
} else {
|
||||
throw new Error('Event not found');
|
||||
}
|
||||
|
||||
10
src/utils/types.d.ts
vendored
10
src/utils/types.d.ts
vendored
@@ -1,9 +1,19 @@
|
||||
import { NDKEvent, NDKUserProfile } from '@nostr-dev-kit/ndk';
|
||||
|
||||
export interface Content {
|
||||
original: string;
|
||||
parsed: string;
|
||||
notes: string[];
|
||||
images: string[];
|
||||
videos: string[];
|
||||
links: string[];
|
||||
}
|
||||
|
||||
export interface LumeEvent extends NDKEvent {
|
||||
event_id?: string;
|
||||
parent_id?: string;
|
||||
replies?: LumeEvent[];
|
||||
content: Content;
|
||||
}
|
||||
|
||||
export interface Account {
|
||||
|
||||
Reference in New Issue
Block a user