mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: setup rollup-plugin-visualizer and remove lodash (#6974)
* chore: setup rollup-plugin-visualizer * chore: remove lodash * format * remove lodash-es from build
This commit is contained in:
parent
abb6922c2b
commit
b273ea2ba4
6 changed files with 261 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import type { AssetResponseDto } from '@api';
|
||||
import lodash from 'lodash-es';
|
||||
import { chain } from 'lodash-es';
|
||||
import { DateTime, Interval } from 'luxon';
|
||||
|
||||
export const fromLocalDateTime = (localDateTime: string) => DateTime.fromISO(localDateTime, { zone: 'UTC' });
|
||||
|
|
@ -45,8 +45,7 @@ export function splitBucketIntoDateGroups(
|
|||
assets: AssetResponseDto[],
|
||||
locale: string | undefined,
|
||||
): AssetResponseDto[][] {
|
||||
return lodash
|
||||
.chain(assets)
|
||||
return chain(assets)
|
||||
.groupBy((asset) => fromLocalDateTime(asset.localDateTime).toLocaleString(groupDateFormat, { locale }))
|
||||
.sortBy((group) => assets.indexOf(group[0]))
|
||||
.value();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue