[Update] AdvancedSettings: OSC IP Address: Add error notifications.
Add 500 status error message.
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import { useStore_OscIpAddress } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
import { useNotificationStatus } from "@logics_common";
|
||||
|
||||
export const useOscIpAddress = () => {
|
||||
const { showNotification_Error } = useNotificationStatus();
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentOscIpAddress, updateOscIpAddress, pendingOscIpAddress } = useStore_OscIpAddress();
|
||||
|
||||
@@ -17,17 +15,10 @@ export const useOscIpAddress = () => {
|
||||
asyncStdoutToPython("/set/data/osc_ip_address", osc_ip_address);
|
||||
};
|
||||
|
||||
const saveErrorOscIpAddress = ({data, message, _result}) => {
|
||||
updateOscIpAddress(d => d.data);
|
||||
showNotification_Error(_result);
|
||||
};
|
||||
|
||||
return {
|
||||
currentOscIpAddress,
|
||||
getOscIpAddress,
|
||||
updateOscIpAddress,
|
||||
setOscIpAddress,
|
||||
|
||||
saveErrorOscIpAddress,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user