Some changes in ui
This commit is contained in:
1 parent
dbea93f9ba
commit
af010e138d
1 file changed
+2
-3
@@ -26,8 +26,8 @@ const SettingsGlobalThresholds = ({
|
|||||||
temperature: "",
|
temperature: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load existing thresholds from settingsData on first render or when settingsData changes
|
// Load existing thresholds from settingsData
|
||||||
useEffect(() => {
|
|
||||||
if (settingsData?.settings?.globalThresholds) {
|
if (settingsData?.settings?.globalThresholds) {
|
||||||
setThresholds({
|
setThresholds({
|
||||||
cpu: settingsData.settings.globalThresholds.cpu || "",
|
cpu: settingsData.settings.globalThresholds.cpu || "",
|
||||||
@@ -36,7 +36,6 @@ const SettingsGlobalThresholds = ({
|
|||||||
temperature: settingsData.settings.globalThresholds.temperature || "",
|
temperature: settingsData.settings.globalThresholds.temperature || "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [settingsData]);
|
|
||||||
|
|
||||||
// Handles input change and updates state & parent data
|
// Handles input change and updates state & parent data
|
||||||
const handleChange = (e, min, max) => {
|
const handleChange = (e, min, max) => {
|
||||||
|
|||||||
Reference in new issue
Block a user