mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-10-04 16:37:00 +02:00
small fix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import dayjs from "dayjs";
|
||||
import { Debugger } from "debug";
|
||||
import { Filter } from "nostr-tools";
|
||||
|
||||
import { NostrEvent, isATag, isETag } from "../types/nostr-event";
|
||||
import { NostrRequestFilter, RelayQueryMap } from "../types/nostr-query";
|
||||
@@ -14,7 +15,7 @@ import deleteEventService from "../services/delete-events";
|
||||
import { addQueryToFilter, isFilterEqual, mapQueryMap, stringifyFilter } from "../helpers/nostr/filter";
|
||||
import { localCacheRelay } from "../services/local-cache-relay";
|
||||
import { SimpleSubscription } from "nostr-idb";
|
||||
import { Filter } from "nostr-tools";
|
||||
import { relayRequest } from "../helpers/relay";
|
||||
|
||||
const BLOCK_SIZE = 100;
|
||||
|
||||
@@ -170,9 +171,8 @@ export default class TimelineLoader {
|
||||
}
|
||||
|
||||
for (const filters of Object.values(queries)) {
|
||||
const sub: SimpleSubscription = localCacheRelay.subscribe(filters, {
|
||||
onevent: (e) => this.handleEvent(e, false),
|
||||
oneose: () => sub.close(),
|
||||
relayRequest(localCacheRelay, filters).then((events) => {
|
||||
for (const e of events) this.handleEvent(e, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -47,9 +47,9 @@ export default function EmbeddedArticle({ article, ...props }: Omit<CardProps, "
|
||||
</LinkOverlay>
|
||||
<Text mb="2">{summary}</Text>
|
||||
{article.tags
|
||||
.filter((t) => t[0] === "t")
|
||||
.map(([_, hashtag]) => (
|
||||
<Tag mr="2" mb="2">
|
||||
.filter((t) => t[0] === "t" && t[1])
|
||||
.map(([_, hashtag]: string[], i) => (
|
||||
<Tag key={hashtag + i} mr="2" mb="2">
|
||||
#{hashtag}
|
||||
</Tag>
|
||||
))}
|
||||
|
@@ -40,7 +40,7 @@ export function embedJSX(content: EmbedableContent, embed: EmbedType): Embedable
|
||||
if (render === null) continue;
|
||||
|
||||
if (typeof render !== "string" && !render.props.key) {
|
||||
render = cloneElement(render, { key: embed.name + match[0] });
|
||||
render = cloneElement(render, { key: embed.name + match[0] + match.index });
|
||||
}
|
||||
|
||||
newContent.push(before, render);
|
||||
|
Reference in New Issue
Block a user