mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-05-02 20:16:59 +00:00
Remove useMemo/useCallback across the web UI
This commit is contained in:
@@ -121,19 +121,19 @@ const NetworkSettings = () => {
|
||||
deselectNetwork();
|
||||
}, [data, saveData, deselectNetwork]);
|
||||
|
||||
const setCancel = useCallback(async () => {
|
||||
const setCancel = async () => {
|
||||
deselectNetwork();
|
||||
await loadData();
|
||||
}, [deselectNetwork, loadData]);
|
||||
};
|
||||
|
||||
const doRestart = useCallback(async () => {
|
||||
const doRestart = async () => {
|
||||
setRestarting(true);
|
||||
await sendAPI({ device: 'system', cmd: 'restart', id: 0 }).catch(
|
||||
(error: Error) => {
|
||||
toast.error(error.message);
|
||||
}
|
||||
);
|
||||
}, [sendAPI]);
|
||||
};
|
||||
|
||||
const content = () => {
|
||||
if (!data) {
|
||||
|
||||
Reference in New Issue
Block a user