fix: auto load achieved entries when show achieved button is available

This commit is contained in:
Stephen Zhou
2024-10-28 10:00:07 +08:00
parent dc85570328
commit 074a60d3cf
@@ -171,10 +171,10 @@ function EntryColumnImpl() {
// automatically fetch archived entries when there is no entries in timeline
useEffect(() => {
if (!isArchived && virtuosoOptions.totalCount === 0 && !entries.isLoading) {
if (showArchivedButton && virtuosoOptions.totalCount === 0 && !entries.isLoading) {
setIsArchived(true)
}
}, [entries.isLoading, isArchived, virtuosoOptions.totalCount])
}, [entries.isLoading, showArchivedButton, virtuosoOptions.totalCount])
return (
<div