import * as React from 'react'; import { Alert, Button, StyleSheet, Switch, TextInput } from 'react-native'; import { Text, View } from '../components/Themed'; import { useState } from 'react'; import ScreenInfo from '../components/ScreenInfo'; import { SafeAreaView } from 'react-native-safe-area-context'; import { Trips } from '../GT2'; import { RootTabScreenProps } from '../types'; export default function SettingsScreen( { navigation }: RootTabScreenProps<'Settings'>) { const [number, onChangeNumber] = React.useState(""); const [isKM, setMiles] = useState(false); const toggleUnits = () => { setMiles(previousState => !previousState) Trips.units = isKM ? "km" : "mi"; }; return ( Model Settings