mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
Alova 3 now working
This commit is contained in:
@@ -39,8 +39,7 @@ import {
|
||||
} from '@table-library/react-table-library/table';
|
||||
import { useTheme } from '@table-library/react-table-library/theme';
|
||||
import { dialogStyle } from 'CustomTheme';
|
||||
import { useRequest } from 'alova';
|
||||
// import { useRequest } from 'alova/client' // TODO replace when Alova 3 is released
|
||||
import { useRequest } from 'alova/client';
|
||||
import RestartMonitor from 'app/status/RestartMonitor';
|
||||
import {
|
||||
BlockNavigation,
|
||||
@@ -111,25 +110,13 @@ const Customizations = () => {
|
||||
}
|
||||
);
|
||||
|
||||
// TODO Alova 3 code...
|
||||
// const { send: sendDeviceEntities } = useRequest(
|
||||
// (data: number) => readDeviceEntities(data),
|
||||
// {
|
||||
// initialData: [],
|
||||
// immediate: false
|
||||
// }
|
||||
// ).onSuccess((event) => {
|
||||
// setOriginalSettings(event.data);
|
||||
// });
|
||||
|
||||
const { send: sendDeviceEntities, onSuccess } = useRequest(
|
||||
const { send: sendDeviceEntities } = useRequest(
|
||||
(data: number) => readDeviceEntities(data),
|
||||
{
|
||||
initialData: [],
|
||||
immediate: false
|
||||
}
|
||||
);
|
||||
onSuccess((event) => {
|
||||
).onSuccess((event) => {
|
||||
setOriginalSettings(event.data);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user