import { RefreshButton } from '@/components/RefreshButton' import SecondaryPageLayout from '@/layouts/SecondaryPageLayout' import { usePrimaryNoteView } from '@/contexts/primary-note-view-context' import { usePrimaryPage } from '@/contexts/primary-page-context' import { cn } from '@/lib/utils' import { useSmartBookmarkListNavigation, useSmartFollowingListNavigation, useSmartMuteListNavigation, useSmartPinListNavigation, useSmartSettingsNavigation } from '@/PageManager' import { toBookmarksList, toFollowSetsSettings, toFollowingList, toMuteList, toPinsList } from '@/lib/link' import { useNostr } from '@/providers/NostrProvider' import { Bookmark, ChevronRight, Pin, Users, VolumeX } from 'lucide-react' import { forwardRef, HTMLProps, useCallback, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' /** * Hub for Nostr “personal lists” (mute list, follows, NIP-51 bookmarks, pins) — not the same as NIP-B0 web bookmarks. */ const PersonalListsSettingsPage = forwardRef( ({ index, hideTitlebar = false }: { index?: number; hideTitlebar?: boolean }, ref) => { const { t } = useTranslation() const { pubkey } = useNostr() const { navigate: navigatePrimary } = usePrimaryPage() const { navigateToSettings } = useSmartSettingsNavigation() const { navigateToMuteList } = useSmartMuteListNavigation() const { navigateToFollowingList } = useSmartFollowingListNavigation() const { navigateToBookmarkList } = useSmartBookmarkListNavigation() const { navigateToPinList } = useSmartPinListNavigation() const { registerPrimaryPanelRefresh } = usePrimaryNoteView() const [contentKey, setContentKey] = useState(0) const bump = useCallback(() => setContentKey((k) => k + 1), []) useEffect(() => { if (!hideTitlebar) { registerPrimaryPanelRefresh(null) return } registerPrimaryPanelRefresh(bump) return () => registerPrimaryPanelRefresh(null) }, [hideTitlebar, registerPrimaryPanelRefresh, bump]) return ( } >

{t('Personal lists hub intro')}

navigateToMuteList(toMuteList())}>
{t('Mute list')}
{pubkey ? ( navigateToFollowingList(toFollowingList(pubkey))} >
{t('Following list')}
) : null} {pubkey ? ( navigateToBookmarkList(toBookmarksList())}>
{t('Bookmarks list')}
) : null} {pubkey ? ( navigateToPinList(toPinsList())}>
{t('Pinned notes list')}
) : null} navigateToSettings(toFollowSetsSettings())}>
{t('Follow sets')}

{t('Personal lists bookmarks spell hint')}{' '}

) } ) PersonalListsSettingsPage.displayName = 'PersonalListsSettingsPage' export default PersonalListsSettingsPage const SettingRow = forwardRef>( ({ children, className, ...props }, ref) => (
{children}
) ) SettingRow.displayName = 'SettingRow'