feat: enhance picture notes browsing experience on large screen
This commit is contained in:
parent
8e567dd401
commit
4acc1203fe
5 changed files with 57 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue