MCPcopy
hub / github.com/game1024/OpenSpeedy / active

Function active

src/components/SpeedPanel.tsx:25–25  ·  view source on GitHub ↗
(g: number)

Source from the content-addressed store, hash-verified

23export default React.memo(function SpeedPanel({ speed, gears, onChange, onCommit }: SpeedPanelProps) {
24 const { t } = useTranslation();
25 const active = (g: number) => Math.abs(speed - g) < 0.001;
26
27 const speedColor = speed > 1.01 ? "secondary.main" : speed < 0.99 ? "warning.main" : "primary.main";
28

Callers 1

SpeedPanel.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected