Fix Settings not updating ApiUri

This commit is contained in:
2024-10-22 18:06:12 +02:00
parent a383ded819
commit f4011a7cbc
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import React, {KeyboardEventHandler, useEffect, useState} from 'react';
import IFrontendSettings from "./interfaces/IFrontendSettings";
import IFrontendSettings, {FrontendSettingsWith} from "./interfaces/IFrontendSettings";
import '../styles/settings.css';
import IBackendSettings from "./interfaces/IBackendSettings";
import {getData} from "../App";
@ -78,8 +78,9 @@ export default function Settings({backendConnected, apiUri, settings, changeSett
}
const SubmitApiUri : KeyboardEventHandler<HTMLInputElement> = (e) => {
const newSettings = FrontendSettingsWith(frontendSettings, undefined, e.currentTarget.value);
if(e.key == "Enter")
changeSettings(settings);
changeSettings(newSettings);
}
return (