mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 21:44:13 +03:00
Properly sort keys for recording summary in StorageMetrics
This commit is contained in:
parent
b105b3f2b4
commit
16ac0b3f5e
@ -70,10 +70,9 @@ export default function StorageMetrics({
|
||||
]);
|
||||
|
||||
const earliestDate = useMemo(() => {
|
||||
const keys = Object.keys(recordingsSummary || {});
|
||||
const keys = Object.keys(recordingsSummary || {}).sort();
|
||||
return keys.length
|
||||
? new TZDate(keys[keys.length - 1] + "T00:00:00", timezone).getTime() /
|
||||
1000
|
||||
? new TZDate(keys[0] + "T00:00:00", timezone).getTime() / 1000
|
||||
: null;
|
||||
}, [recordingsSummary, timezone]);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user