feat: enhance picture notes browsing experience on large screen

This commit is contained in:
codytseng 2025-01-15 16:44:33 +08:00
parent 8e567dd401
commit 4acc1203fe
5 changed files with 57 additions and 13 deletions

View file

@ -30,7 +30,7 @@ export default function NoteList({
className?: string
}) {
const { t } = useTranslation()
const { isSmallScreen } = useScreenSize()
const { isLargeScreen } = useScreenSize()
const { signEvent, checkLogin } = useNostr()
const { areAlgoRelays } = useFetchRelayInfos([...relayUrls])
const [refreshCount, setRefreshCount] = useState(0)
@ -180,7 +180,7 @@ export default function NoteList({
{isPictures ? (
<PictureNoteCardMasonry
className="px-2 sm:px-4"
columnCount={isSmallScreen ? 2 : 3}
columnCount={isLargeScreen ? 3 : 2}
events={events}
/>
) : (
@ -268,7 +268,7 @@ function PictureNoteCardMasonry({
)
})
return newColumns
}, [events])
}, [events, columnCount])
return (
<div