fix: 🐛

This commit is contained in:
codytseng
2024-12-24 13:08:40 +08:00
parent 31f70c2ab1
commit b5174df32c
4 changed files with 19 additions and 11 deletions

View File

@@ -11,8 +11,8 @@ import SecondaryPageLayout from '@/layouts/SecondaryPageLayout'
import { getParentEventId, getRootEventId } from '@/lib/event'
import { toNote } from '@/lib/link'
import { useMemo } from 'react'
import NotFoundPage from '../NotFoundPage'
import { useTranslation } from 'react-i18next'
import NotFoundPage from '../NotFoundPage'
export default function NotePage({ id }: { id?: string }) {
const { t } = useTranslation()

View File

@@ -24,7 +24,7 @@ import QrCodePopover from './QrCodePopover'
export default function ProfilePage({ id }: { id?: string }) {
const { t } = useTranslation()
const { profile, isFetching } = useFetchProfile(id)
const relayList = useFetchRelayList(profile?.pubkey)
const { relayList, isFetching: isFetchingRelayInfo } = useFetchRelayList(profile?.pubkey)
const { relayUrls: currentRelayUrls } = useRelaySettings()
const { pubkey: accountPubkey } = useNostr()
const { followings: selfFollowings } = useFollowList()
@@ -99,12 +99,13 @@ export default function ProfilePage({ id }: { id?: string }) {
</div>
</div>
<Separator className="hidden sm:block mt-4 sm:my-4" />
<NoteList
key={pubkey}
filter={{ authors: [pubkey] }}
relayUrls={relayList.write.slice(0, 5).concat(currentRelayUrls)}
className="max-sm:mt-2"
/>
{!isFetchingRelayInfo && (
<NoteList
filter={{ authors: [pubkey] }}
relayUrls={relayList.write.slice(0, 5).concat(currentRelayUrls)}
className="max-sm:mt-2"
/>
)}
</SecondaryPageLayout>
)
}