import { FlatList, SafeAreaView, StyleSheet, Text, View } from "react-native"; import React from "react"; import { RicohSettings, setRicohSetting } from "../../redux/AppStateSlice"; import FormField from "../molecules/FormField"; import { useSelector } from "react-redux"; import { RootState, useAppDispatch } from "../../redux/store"; import Icon from "react-native-vector-icons/MaterialCommunityIcons"; import Button from "../atoms/Button"; import { setActiveScreen } from "../../redux/UtilSlice"; type Props = {}; const RicohSettingsScreen = (props: Props) => { const dispatch = useAppDispatch(); const { ricohSettings } = useSelector((state: RootState) => state.AppState); const buildSelectListForRicoh = (settings: RicohSettings) => { return ( ( { const updatedValue = typeof item.value === "number" ? parseFloat(value) : value; if (item.available.includes(updatedValue)) { const apiValue = item.available.find( (val) => val === updatedValue ); let obj: any = {}; obj[item.name] = apiValue; dispatch( setRicohSetting({ options: { ...obj, }, }) ); } }} /> )} /> ); }; return (