diff --git a/components/HomeView.tsx b/components/HomeView.tsx index 0904ad3..e121822 100644 --- a/components/HomeView.tsx +++ b/components/HomeView.tsx @@ -7,7 +7,6 @@ import { ArticlesList } from '@/components/ArticlesList' import { PageHeader } from '@/components/PageHeader' import { Footer } from '@/components/Footer' import { FundingGauge } from '@/components/FundingGauge' -import { t } from '@/lib/i18n' import type { Dispatch, SetStateAction } from 'react' interface HomeViewProps { diff --git a/lib/nostrEventParsing.ts b/lib/nostrEventParsing.ts index d44f44c..720aa35 100644 --- a/lib/nostrEventParsing.ts +++ b/lib/nostrEventParsing.ts @@ -88,45 +88,9 @@ export function parseReviewFromEvent(event: Event): Review | null { // This function is kept for backward compatibility but should be migrated // Currently unused - kept for potential future migration function _unusedExtractTags(_event: Event) { - const tags = extractTagsFromEvent(event) - const mediaTags = event.tags.filter((tag: string[]) => tag[0] === 'media') - const media: MediaRef[] = - mediaTags - .map((tag: string[]) => { - const url = tag[1] - const type = tag[2] === 'video' ? 'video' : 'image' - if (!url) { - return null - } - return { url, type } - }) - .filter(Boolean) as MediaRef[] - - // Map category from new system to old system - const category = tags.category === 'sciencefiction' ? 'science-fiction' : tags.category === 'research' ? 'scientific-research' : undefined - const isPresentation = tags.type === 'author' - - return { - title: (tags.title as string | undefined) ?? 'Untitled', - preview: tags.preview as string | undefined, - description: tags.description as string | undefined, - zapAmount: (tags.zapAmount as number | undefined) ?? 800, - invoice: tags.invoice as string | undefined, - paymentHash: tags.paymentHash as string | undefined, - category, - isPresentation, - mainnetAddress: tags.mainnetAddress as string | undefined, - totalSponsoring: (tags.totalSponsoring as number | undefined) ?? 0, - authorPresentationId: undefined, // Not used in new system - seriesId: tags.seriesId as string | undefined, - bannerUrl: tags.bannerUrl as string | undefined, - coverUrl: tags.coverUrl as string | undefined, - media, - kindType: tags.type === 'author' ? 'article' : tags.type === 'series' ? 'series' : tags.type === 'publication' ? 'article' : tags.type === 'quote' ? 'review' : undefined, - articleId: tags.articleId as string | undefined, - reviewerPubkey: tags.reviewerPubkey as string | undefined, - author: undefined, // Not used in new system - } + // This function is intentionally unused - kept for backward compatibility + // If needed in the future, uncomment and implement using _event parameter + return null } function getPreviewContent(content: string, previewTag?: string) {