mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
fix(core): improve performance (#6345)
This commit is contained in:
@@ -196,11 +196,9 @@ const JournalDailyCountBlock = ({ date }: JournalBlockProps) => {
|
||||
(field: 'createDate' | 'updatedDate') => {
|
||||
return sortPagesByDate(
|
||||
pageRecords.filter(pageRecord => {
|
||||
if (pageRecord.meta$.value.trash) return false;
|
||||
return (
|
||||
pageRecord.meta$.value[field] &&
|
||||
dayjs(pageRecord.meta$.value[field]).isSame(date, 'day')
|
||||
);
|
||||
const meta = pageRecord.meta$.value;
|
||||
if (meta.trash) return false;
|
||||
return meta[field] && dayjs(meta[field]).isSame(date, 'day');
|
||||
}),
|
||||
field
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user