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.
This commit is contained in:
padreug 2025-08-06 14:54:29 +02:00
parent 0e40b62466
commit 37a539bc2d
2 changed files with 3 additions and 9 deletions

View file

@ -290,12 +290,7 @@ interface Peer {
pubkey: string
}
interface ChatMessage {
id: string
content: string
created_at: number
sent: boolean
}
// State
const peers = ref<Peer[]>([])
@ -454,7 +449,7 @@ const formatTime = (timestamp: number) => {
})
}
const getPeerAvatar = (peer: Peer) => {
const getPeerAvatar = (_peer: Peer) => {
// You can implement avatar logic here
return null
}

View file

@ -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)