MCPcopy Create free account
hub / github.com/botbotrobotics/BotBrain / getPacketLossColor

Function getPacketLossColor

frontend/src/components/robot-header.tsx:967–972  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

965
966 // Color based on packet loss levels
967 const getPacketLossColor = () => {
968 if (packetLoss === 0) return 'text-green-600 dark:text-green-400';
969 if (packetLoss < 1) return 'text-green-600 dark:text-green-400';
970 if (packetLoss < 5) return 'text-yellow-600 dark:text-yellow-400';
971 return 'text-red-600 dark:text-red-400';
972 };
973
974 const getQualityText = () => {
975 if (packetLoss === 0) return 'No loss';

Callers 1

PacketLossIndicatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected