This commit is contained in:
Shusui MOYATANI
2023-03-07 02:21:26 +09:00
parent f79365dbc4
commit f2b1360fd5
19 changed files with 137 additions and 71 deletions

View File

@@ -1,5 +1,5 @@
import { createMemo, type Accessor } from 'solid-js';
import { type Event as NostrEvent } from 'nostr-tools/event';
import { type Event as NostrEvent } from 'nostr-tools';
import { createQuery, useQueryClient, type CreateQueryResult } from '@tanstack/solid-query';
import useBatchedEvents, { type BatchedEvents } from '@/clients/useBatchedEvents';
@@ -19,6 +19,7 @@ export type UseReactions = {
};
const { exec } = useBatchedEvents<UseReactionsProps>(() => ({
interval: 5000,
generateKey: ({ eventId }) => eventId,
mergeFilters: (args) => {
const eventIds = args.map((arg) => arg.eventId);