From 37a539bc2de7ecc7e30e3bf1e7a6f4e637d00f5e Mon Sep 17 00:00:00 2001 From: padreug Date: Wed, 6 Aug 2025 14:54:29 +0200 Subject: [PATCH] Fix Build Errors (Clean up ChatComponent and useNostrChat) - Remove unused ChatMessage interface from ChatComponent to streamline the code. - Update getPeerAvatar function parameter for clarity by renaming it to _peer. - Remove unnecessary useNostrStore import in useNostrChat, simplifying the composable's structure. --- src/components/nostr/ChatComponent.vue | 9 ++------- src/composables/useNostrChat.ts | 3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/components/nostr/ChatComponent.vue b/src/components/nostr/ChatComponent.vue index 2cf7f9a..5fa8a05 100644 --- a/src/components/nostr/ChatComponent.vue +++ b/src/components/nostr/ChatComponent.vue @@ -290,12 +290,7 @@ interface Peer { pubkey: string } -interface ChatMessage { - id: string - content: string - created_at: number - sent: boolean -} + // State const peers = ref([]) @@ -454,7 +449,7 @@ const formatTime = (timestamp: number) => { }) } -const getPeerAvatar = (peer: Peer) => { +const getPeerAvatar = (_peer: Peer) => { // You can implement avatar logic here return null } diff --git a/src/composables/useNostrChat.ts b/src/composables/useNostrChat.ts index 222e119..343c25c 100644 --- a/src/composables/useNostrChat.ts +++ b/src/composables/useNostrChat.ts @@ -1,5 +1,5 @@ import { ref, computed, readonly } from 'vue' -import { useNostrStore } from '@/stores/nostr' + import { SimplePool, nip04, finalizeEvent, type EventTemplate } from 'nostr-tools' import { hexToBytes } from '@/lib/utils/crypto' import { getAuthToken } from '@/lib/config/lnbits' @@ -31,7 +31,6 @@ const getRelays = (): NostrRelayConfig[] => { } export function useNostrChat() { - const nostrStore = useNostrStore() // State const isConnected = ref(false)