Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function Settings (): React.ReactElement<{}> {
const [camera, setCamera] = useState(settings.camera);
const [prefix, setPrefix] = useState(`${settings.prefix}`);
const _onChangeCamera = (camera: string): void => {
setCamera(camera);
settings.set({ camera });
};
// FIXME check against index, we need a better solution
const _onChangePrefix = (value: string): void => {
const prefix = parseInt(value, 10);
setSS58Format(prefix === -1 ? 42 : prefix);
setPrefix(value);
settings.set({ prefix });