Fetch timeline events from events endpoint not media browser.

This commit is contained in:
Dermot Duffy
2022-09-24 11:31:03 -07:00
parent 0491018aab
commit a2e80d93a3
13 changed files with 300 additions and 165 deletions
+10
View File
@@ -1,3 +1,4 @@
import { format } from 'date-fns';
import { isEqual } from 'lodash-es';
import { FrigateCardError } from '../types';
@@ -85,3 +86,12 @@ export function errorToConsole(e: Error, func?: CallableFunction): void {
export const isHoverableDevice = (): boolean => window.matchMedia(
'(hover: hover) and (pointer: fine)',
).matches;
/**
* Format a date object to RFC3339.
* @param date A Date object.
* @returns A date and time.
*/
export const formatDateAndTime = (date: Date): string => {
return format(date, 'yyyy-MM-dd HH:mm');
}