diff --git a/src/modules/nostr-feed/components/NostrFeed.vue b/src/modules/nostr-feed/components/NostrFeed.vue index 40f4781..d4e8dac 100644 --- a/src/modules/nostr-feed/components/NostrFeed.vue +++ b/src/modules/nostr-feed/components/NostrFeed.vue @@ -10,7 +10,7 @@ import { useReactions } from '../composables/useReactions' import appConfig from '@/app.config' import type { ContentFilter } from '../services/FeedService' import MarketProduct from './MarketProduct.vue' -import { parseMarketProduct, isMarketEvent, getMarketEventType } from '../utils/marketParser' +import { parseMarketProduct } from '../utils/marketParser' interface Emits { (e: 'reply-to-note', note: { id: string; content: string; pubkey: string }): void @@ -140,7 +140,8 @@ function getMarketProductData(note: any) { content: note.content, created_at: note.created_at, kind: note.kind, - tags: note.tags + tags: note.tags, + sig: '' // Required by Event interface } return parseMarketProduct(mockEvent) } @@ -313,11 +314,11 @@ async function onToggleLike(note: any) { Reply - {{ getMarketEventType({ kind: note.kind }) }} + Market Product () const emit = defineEmits() // Services -const relayHub = injectService(SERVICE_TOKENS.RELAY_HUB) -const authService = injectService(SERVICE_TOKENS.AUTH_SERVICE) +const relayHub = injectService(SERVICE_TOKENS.RELAY_HUB) as any +const authService = injectService(SERVICE_TOKENS.AUTH_SERVICE) as any const toast = useToast() // Form state @@ -193,7 +193,7 @@ const form = useForm({ const { values, meta, resetForm, setFieldValue } = form // Computed properties -const isFormValid = computed(() => meta.value.valid && values.content.trim().length > 0) +const isFormValid = computed(() => meta.value.valid && (values.content?.trim().length || 0) > 0) const characterCount = computed(() => values.content?.length || 0) // Watch mentions array and sync with form @@ -294,7 +294,7 @@ const onSubmit = form.handleSubmit(async (values) => { // Create note event template const eventTemplate: EventTemplate = { kind: 1, - content: values.content.trim(), + content: values.content?.trim() || '', tags, created_at: Math.floor(Date.now() / 1000) } diff --git a/src/modules/nostr-feed/components/RideshareComposer.vue b/src/modules/nostr-feed/components/RideshareComposer.vue index 9d6ed4a..9df607b 100644 --- a/src/modules/nostr-feed/components/RideshareComposer.vue +++ b/src/modules/nostr-feed/components/RideshareComposer.vue @@ -223,7 +223,7 @@