- {parsedContent.hashtags.map((tag) => (
+ {parsedContent?.hashtags?.map((tag) => (
Error loading content
}
+ if (!parsedContent) {
+ return
No content available
+ }
+
return (
{/* Render content without ToC and Article Info */}
diff --git a/src/lib/discussion-topics.ts b/src/lib/discussion-topics.ts
index 9cabec9..cee51bd 100644
--- a/src/lib/discussion-topics.ts
+++ b/src/lib/discussion-topics.ts
@@ -309,7 +309,7 @@ export function extractGroupInfo(
}
}
- const { groupId, groupRelay, fullIdentifier } = parseGroupIdentifier(hTag, relaySources)
+ const { groupId, groupRelay } = parseGroupIdentifier(hTag, relaySources)
const groupDisplayName = buildGroupDisplayName(groupId, groupRelay)
return {
diff --git a/src/pages/primary/DiscussionsPage/index.tsx b/src/pages/primary/DiscussionsPage/index.tsx
index 3b23cc1..b8effdb 100644
--- a/src/pages/primary/DiscussionsPage/index.tsx
+++ b/src/pages/primary/DiscussionsPage/index.tsx
@@ -457,6 +457,13 @@ const DiscussionsPage = forwardRef((_, ref) => {
logger.debug('[DiscussionsPage] Thread', threadId.substring(0, 8), 'has votes:', voteStats)
}
+ // Get relay sources
+ const eventHints = client.getEventHints(threadId)
+ const relaySources = eventHints.length > 0 ? eventHints : ['unknown']
+
+ // Extract group information
+ const groupInfo = extractGroupInfo(thread, relaySources)
+
// Extract topics
const tTagsRaw = thread.tags.filter((tag: string[]) => tag[0] === 't' && tag[1]).map((tag: string[]) => tag[1].toLowerCase())
const hashtagsRaw = (thread.content.match(/#\w+/g) || []).map((tag: string) => tag.slice(1).toLowerCase())
@@ -471,13 +478,6 @@ const DiscussionsPage = forwardRef((_, ref) => {
const hashtags = hashtagsRaw.map((tag: string) => normalizeTopic(tag))
const allTopics = [...new Set([...tTags, ...hashtags])]
- // Get relay sources
- const eventHints = client.getEventHints(threadId)
- const relaySources = eventHints.length > 0 ? eventHints : ['unknown']
-
- // Extract group information
- const groupInfo = extractGroupInfo(thread, relaySources)
-
newEventMap.set(threadId, {
event: thread,
relaySources,
diff --git a/src/providers/GroupListProvider.tsx b/src/providers/GroupListProvider.tsx
index 3517985..47d98be 100644
--- a/src/providers/GroupListProvider.tsx
+++ b/src/providers/GroupListProvider.tsx
@@ -1,5 +1,4 @@
import { createContext, useContext, useEffect, useState, useCallback, useMemo } from 'react'
-import { useTranslation } from 'react-i18next'
import { useNostr } from '@/providers/NostrProvider'
import { useFavoriteRelays } from '@/providers/FavoriteRelaysProvider'
import { ExtendedKind } from '@/constants'
@@ -26,8 +25,7 @@ export const useGroupList = () => {
}
export function GroupListProvider({ children }: { children: React.ReactNode }) {
- const { t } = useTranslation()
- const { pubkey: accountPubkey, publish, updateGroupListEvent } = useNostr()
+ const { pubkey: accountPubkey } = useNostr()
const { favoriteRelays } = useFavoriteRelays()
const [userGroups, setUserGroups] = useState([])
const [isLoading, setIsLoading] = useState(false)
diff --git a/src/services/nip89.service.ts b/src/services/nip89.service.ts
index 0434e34..4b35cc0 100644
--- a/src/services/nip89.service.ts
+++ b/src/services/nip89.service.ts
@@ -1,6 +1,5 @@
import { ExtendedKind } from '@/constants'
import { Event, kinds } from 'nostr-tools'
-import * as nip19 from 'nostr-tools/nip19'
export interface ApplicationHandlerInfo {
name: string
@@ -227,7 +226,6 @@ class Nip89Service {
ExtendedKind.RELAY_REVIEW,
ExtendedKind.PUBLICATION,
ExtendedKind.WIKI_ARTICLE,
- ExtendedKind.WIKI_CHAPTER
],
platforms: {
web: 'https://jumble.gitcitadel.eu/note/bech32',