import { toFixed, round } from 'common/math'; import { useBackend } from '../backend'; import { Box, Button, Icon, LabeledList, NumberInput, Section } from '../components'; import { Window } from '../layouts'; export const BeaconLocator = (props, context) => { const { act, data } = useBackend(context); const { scan_ticks, degrees, rawfreq, minFrequency, maxFrequency, } = data; return (
{scan_ticks && ( Scanning... ) || null} {degrees && ( Locked on. Follow the arrow. ) || ( No lock. )} toFixed(value, 1)} onDrag={(e, value) => act('setFrequency', { freq: round(value * 10), })} />
); };