perf(web): optimize date groups (#7593)

* optimize date groups

* remove `.values()`

* remove console.log

* remove if condition

* remove console.log

* remove outdated comment

* revert dynamic import
This commit is contained in:
Mert 2024-03-03 17:12:52 -05:00 committed by GitHub
parent 2fa10a254c
commit 762c4684f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 96 additions and 104 deletions

View file

@ -38,8 +38,8 @@
return buckets.map((bucket) => {
const segment = new Segment();
segment.count = bucket.assets.length;
segment.height = toScrollY(bucket.bucketHeight);
segment.timeGroup = bucket.bucketDate;
segment.height = toScrollY(bucket.height);
segment.timeGroup = bucket.date;
segment.date = fromLocalDateTime(segment.timeGroup);
if (previous?.date.year !== segment.date.year && height > MIN_YEAR_LABEL_DISTANCE) {