feat: explore
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { usePrimaryPage } from '@/PageManager'
|
||||
import relayInfoService from '@/services/relay-info.service'
|
||||
import { TNip66RelayInfo } from '@/types'
|
||||
import { TRelayInfo } from '@/types'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import RelaySimpleInfo, { RelaySimpleInfoSkeleton } from '../RelaySimpleInfo'
|
||||
@@ -10,7 +10,7 @@ export default function RelayList() {
|
||||
const { t } = useTranslation()
|
||||
const { navigate } = usePrimaryPage()
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [relays, setRelays] = useState<TNip66RelayInfo[]>([])
|
||||
const [relays, setRelays] = useState<TRelayInfo[]>([])
|
||||
const [showCount, setShowCount] = useState(20)
|
||||
const [input, setInput] = useState('')
|
||||
const [debouncedInput, setDebouncedInput] = useState(input)
|
||||
@@ -82,7 +82,7 @@ export default function RelayList() {
|
||||
/>
|
||||
))}
|
||||
{showCount < relays.length && <div ref={bottomRef} />}
|
||||
{loading && <RelaySimpleInfoSkeleton />}
|
||||
{loading && <RelaySimpleInfoSkeleton className="p-4" />}
|
||||
{!loading && relays.length === 0 && (
|
||||
<div className="text-center text-muted-foreground text-sm">{t('no relays found')}</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user