feat: improve mobile experience

This commit is contained in:
codytseng 2025-01-02 21:57:14 +08:00
parent 8ec0d46d58
commit 3946e603b3
98 changed files with 2508 additions and 1058 deletions

View file

@ -4,7 +4,7 @@ import SecondaryPageLayout from '@/layouts/SecondaryPageLayout'
import { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
export default function FollowingListPage({ id }: { id?: string }) {
export default function FollowingListPage({ id, index }: { id?: string; index?: number }) {
const { t } = useTranslation()
const { profile } = useFetchProfile(id)
const { followings } = useFetchFollowings(profile?.pubkey)
@ -45,13 +45,15 @@ export default function FollowingListPage({ id }: { id?: string }) {
return (
<SecondaryPageLayout
index={index}
titlebarContent={
profile?.username
? t("username's following", { username: profile.username })
: t('following')
: t('Following')
}
displayScrollToTopButton
>
<div className="space-y-2 max-sm:px-4">
<div className="space-y-2 px-4">
{visibleFollowings.map((pubkey, index) => (
<UserItem key={`${index}-${pubkey}`} pubkey={pubkey} />
))}