mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-11 16:07:15 +02:00
fix: Properly type Array.from() calls in ChannelListRenderer
Fixes TS2345 errors by explicitly typing the Array.from<NostrEvent>() calls when converting Map iterator values to arrays. This resolves the 'unknown' type inference issues in the map callbacks.
This commit is contained in:
@@ -110,7 +110,7 @@ export function ChannelListRenderer({ event }: BaseEventProps) {
|
||||
const kind40Pubkeys = kind40Events
|
||||
? Array.from(
|
||||
new Set(
|
||||
Array.from(kind40Events.values()).map((e: NostrEvent) => e.pubkey),
|
||||
Array.from<NostrEvent>(kind40Events.values()).map((e) => e.pubkey),
|
||||
),
|
||||
)
|
||||
: [];
|
||||
@@ -253,7 +253,7 @@ export function ChannelListDetailRenderer({ event }: { event: NostrEvent }) {
|
||||
const kind40Pubkeys = kind40Events
|
||||
? Array.from(
|
||||
new Set(
|
||||
Array.from(kind40Events.values()).map((e: NostrEvent) => e.pubkey),
|
||||
Array.from<NostrEvent>(kind40Events.values()).map((e) => e.pubkey),
|
||||
),
|
||||
)
|
||||
: [];
|
||||
|
||||
Reference in New Issue
Block a user