mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 03:35:26 +03:00
Lint fixes
This commit is contained in:
parent
d7812c28c6
commit
42dd3064fa
@ -1,11 +1,11 @@
|
||||
import * as React from "react"
|
||||
import { ChevronLeft, ChevronRight } from "lucide-react"
|
||||
import { DayPicker } from "react-day-picker"
|
||||
import * as React from "react";
|
||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||
import { DayPicker } from "react-day-picker";
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import { buttonVariants } from "@/components/ui/button"
|
||||
import { cn } from "@/lib/utils";
|
||||
import { buttonVariants } from "@/components/ui/button";
|
||||
|
||||
export type CalendarProps = React.ComponentProps<typeof DayPicker>
|
||||
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
||||
|
||||
function Calendar({
|
||||
className,
|
||||
@ -52,13 +52,15 @@ function Calendar({
|
||||
...classNames,
|
||||
}}
|
||||
components={{
|
||||
// @ts-ignore
|
||||
IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
|
||||
// @ts-ignore
|
||||
IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
|
||||
}}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
Calendar.displayName = "Calendar"
|
||||
Calendar.displayName = "Calendar";
|
||||
|
||||
export { Calendar }
|
||||
export { Calendar };
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
export interface UiConfig {
|
||||
timezone: string;
|
||||
time_format: "browser" | "12hour" | "24hour";
|
||||
date_style: "full" | "long" | "medium" | "short";
|
||||
time_style: "full" | "long" | "medium" | "short";
|
||||
strftime_fmt: string;
|
||||
live_mode: string;
|
||||
use_experimental: boolean;
|
||||
timezone?: string;
|
||||
time_format?: 'browser' | '12hour' | '24hour';
|
||||
date_style?: 'full' | 'long' | 'medium' | 'short';
|
||||
time_style?: 'full' | 'long' | 'medium' | 'short';
|
||||
strftime_fmt?: string;
|
||||
live_mode?: string;
|
||||
use_experimental?: boolean;
|
||||
}
|
||||
|
||||
export interface CameraConfig {
|
||||
|
||||
@ -143,8 +143,8 @@ export const formatUnixTimestampToDateTime = (unixTimestamp: number, config: UiC
|
||||
// fallback if the browser does not support dateStyle/timeStyle in Intl.DateTimeFormat
|
||||
// This works even tough the timezone is undefined, it will use the runtime's default time zone
|
||||
if (!containsTime) {
|
||||
const dateOptions = { ...formatMap[date_style]?.date, timeZone: options.timeZone, hour12: options.hour12 };
|
||||
const timeOptions = { ...formatMap[time_style]?.time, timeZone: options.timeZone, hour12: options.hour12 };
|
||||
const dateOptions = { ...formatMap[date_style ?? ""]?.date, timeZone: options.timeZone, hour12: options.hour12 };
|
||||
const timeOptions = { ...formatMap[time_style ?? ""]?.time, timeZone: options.timeZone, hour12: options.hour12 };
|
||||
|
||||
return `${date.toLocaleDateString(locale, dateOptions)} ${date.toLocaleTimeString(locale, timeOptions)}`;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user