Fixed Bug in Status Overview
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { getVehicleDisplayStatus } from '@/lib/utils';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { fetchVehicles, getUpdates, fetchGroups, Vehicle, FirmwareUpdate, VehicleGroup } from '@/lib/api';
|
||||
import { VehicleList } from '@/components/VehicleList';
|
||||
@@ -33,8 +34,8 @@ export default function Home() {
|
||||
return () => clearInterval(interval);
|
||||
}, []);
|
||||
|
||||
const onlineCount = vehicles.filter(v => v.status === 'Online').length;
|
||||
const updatingCount = vehicles.filter(v => v.status === 'Updating').length;
|
||||
const onlineCount = vehicles.filter(v => getVehicleDisplayStatus(v) === 'Online').length;
|
||||
const updatingCount = vehicles.filter(v => getVehicleDisplayStatus(v) === 'Updating').length;
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-black text-zinc-100 selection:bg-indigo-500/30">
|
||||
|
||||
Reference in New Issue
Block a user