refactor: page manager

This commit is contained in:
codytseng 2025-11-03 17:41:01 +08:00
parent 1b7ec56c89
commit 579385ce3d
13 changed files with 131 additions and 121 deletions

View file

@ -7,6 +7,7 @@ import { BIG_RELAY_URLS, ExtendedKind } from '@/constants'
import PrimaryPageLayout from '@/layouts/PrimaryPageLayout'
import { getReplaceableEventIdentifier } from '@/lib/event'
import { useUserTrust } from '@/providers/UserTrustProvider'
import { TPageRef } from '@/types'
import { Compass, Plus } from 'lucide-react'
import { NostrEvent } from 'nostr-tools'
import { forwardRef, useCallback, useMemo, useState } from 'react'
@ -14,7 +15,7 @@ import { useTranslation } from 'react-i18next'
type TExploreTabs = 'following' | 'explore' | 'reviews'
const ExplorePage = forwardRef((_, ref) => {
const ExplorePage = forwardRef<TPageRef>((_, ref) => {
const { hideUntrustedNotes } = useUserTrust()
const [tab, setTab] = useState<TExploreTabs>('explore')