High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix: update lodash calls (#6996)
Ben McCann9d072b5f5520
diff --git a/web/src/lib/utils/timeline-util.ts b/web/src/lib/utils/timeline-util.tsindex 10422e59e2..e6e33d0b2f 100644--- a/web/src/lib/utils/timeline-util.ts+++ b/web/src/lib/utils/timeline-util.ts@@ -1,5 +1,5 @@import type { AssetResponseDto } from '@api';-import { chain } from 'lodash-es';+import { groupBy, sortBy } from 'lodash-es';import { DateTime, Interval } from 'luxon';export const fromLocalDateTime = (localDateTime: string) => DateTime.fromISO(localDateTime, { zone: 'UTC' });@@ -45,8 +45,8 @@ export function splitBucketIntoDateGroups(assets: AssetResponseDto[],locale: string | undefined,): AssetResponseDto[][] {- return chain(assets)- .groupBy((asset) => fromLocalDateTime(asset.localDateTime).toLocaleString(groupDateFormat, { locale }))- .sortBy((group) => assets.indexOf(group[0]))- .value();+ const grouped = groupBy(assets, (asset) =>+ fromLocalDateTime(asset.localDateTime).toLocaleString(groupDateFormat, { locale }),+ );+ return sortBy(grouped, (group) => assets.indexOf(group[0]));}