mirror of
https://github.com/alexhopeoconnor/frigate.git
synced 2026-10-22 03:02:09 +10:00
Simplify ws updating (#12390)
* Simplify ws updating * Simplify return values
This commit is contained in:
@@ -26,7 +26,7 @@ export default function CameraMetrics({
|
||||
);
|
||||
|
||||
const [statsHistory, setStatsHistory] = useState<FrigateStats[]>([]);
|
||||
const { payload: updatedStats } = useFrigateStats();
|
||||
const updatedStats = useFrigateStats();
|
||||
|
||||
useEffect(() => {
|
||||
if (initialStats == undefined || initialStats.length == 0) {
|
||||
|
||||
@@ -40,7 +40,7 @@ export default function GeneralMetrics({
|
||||
);
|
||||
|
||||
const [statsHistory, setStatsHistory] = useState<FrigateStats[]>([]);
|
||||
const { payload: updatedStats } = useFrigateStats();
|
||||
const updatedStats = useFrigateStats();
|
||||
|
||||
useEffect(() => {
|
||||
if (initialStats == undefined || initialStats.length == 0) {
|
||||
|
||||
Reference in New Issue
Block a user