Fetch timeline events from events endpoint not media browser.
This commit is contained in:
@@ -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');
|
||||
}
|
||||
Reference in New Issue
Block a user