mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 12:15:25 +03:00
Cleanup
This commit is contained in:
parent
3d62b88ada
commit
321eec77bc
@ -4,7 +4,7 @@ import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
|||||||
import { Event as FrigateEvent } from "@/types/event";
|
import { Event as FrigateEvent } from "@/types/event";
|
||||||
import { FrigateConfig } from "@/types/frigateConfig";
|
import { FrigateConfig } from "@/types/frigateConfig";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useMemo } from "react";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
function Live() {
|
function Live() {
|
||||||
@ -23,7 +23,7 @@ function Live() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
date.setHours(date.getHours() - 4);
|
date.setHours(date.getHours() - 1);
|
||||||
const cutoff = date.getTime() / 1000;
|
const cutoff = date.getTime() / 1000;
|
||||||
return allEvents.filter((event) => event.start_time > cutoff);
|
return allEvents.filter((event) => event.start_time > cutoff);
|
||||||
}, [allEvents]);
|
}, [allEvents]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user