Fix inversion of const definition location

This commit is contained in:
Jack Kingsman
2026-04-10 14:51:19 -07:00
parent 390c0624ea
commit f9f046a05f
3 changed files with 8 additions and 4 deletions

View File

@@ -13,7 +13,11 @@ import { api } from '../api';
import { toast } from './ui/sonner';
import { handleKeyboardActivate } from '../utils/a11y';
import { applyTheme, getSavedTheme, THEME_CHANGE_EVENT } from '../utils/theme';
import { getShowBatteryPercent, getShowBatteryVoltage } from '../utils/batteryDisplay';
import {
BATTERY_DISPLAY_CHANGE_EVENT,
getShowBatteryPercent,
getShowBatteryVoltage,
} from '../utils/batteryDisplay';
import { cn } from '@/lib/utils';
// Meshtastic default OCV table (meshtastic/firmware src/power.h)
@@ -43,8 +47,6 @@ function mvToPercent(mv: number): number {
return 0;
}
export const BATTERY_DISPLAY_CHANGE_EVENT = 'remoteterm-battery-display-change';
interface StatusBarProps {
health: HealthStatus | null;
config: RadioConfig | null;

View File

@@ -29,12 +29,12 @@ import {
} from '../../utils/fontScale';
import { getAutoFocusInputEnabled, setAutoFocusInputEnabled } from '../../utils/autoFocusInput';
import {
BATTERY_DISPLAY_CHANGE_EVENT,
getShowBatteryPercent,
setShowBatteryPercent as saveBatteryPercent,
getShowBatteryVoltage,
setShowBatteryVoltage as saveBatteryVoltage,
} from '../../utils/batteryDisplay';
import { BATTERY_DISPLAY_CHANGE_EVENT } from '../StatusBar';
export function SettingsLocalSection({
onLocalLabelChange,

View File

@@ -1,3 +1,5 @@
export const BATTERY_DISPLAY_CHANGE_EVENT = 'remoteterm-battery-display-change';
const PERCENT_KEY = 'remoteterm-show-battery-percent';
const VOLTAGE_KEY = 'remoteterm-show-battery-voltage';