mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
upgrade yarn to pnpm because why not
This commit is contained in:
@@ -41,7 +41,8 @@ const Help = () => {
|
||||
|
||||
useRequest(() => callAction({ action: 'getCustomSupport' })).onSuccess((event) => {
|
||||
if (event && event.data && Object.keys(event.data).length !== 0) {
|
||||
const data = event.data.Support;
|
||||
const data = (event.data as { Support: { img_url?: string; html?: string[] } })
|
||||
.Support;
|
||||
if (data.img_url) {
|
||||
setCustomSupportIMG(data.img_url);
|
||||
}
|
||||
@@ -59,7 +60,7 @@ const Help = () => {
|
||||
toast.info(LL.DOWNLOAD_SUCCESSFUL());
|
||||
})
|
||||
.onError((error) => {
|
||||
toast.error(error.message);
|
||||
toast.error(String(error.error?.message || 'An error occurred'));
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
@@ -35,7 +35,7 @@ const DownloadUpload = () => {
|
||||
toast.info(LL.DOWNLOAD_SUCCESSFUL());
|
||||
})
|
||||
.onError((error) => {
|
||||
toast.error(error.message);
|
||||
toast.error(String(error.error?.message || 'An error occurred'));
|
||||
});
|
||||
|
||||
const { send: sendAPI } = useRequest((data: APIcall) => API(data), {
|
||||
|
||||
@@ -51,7 +51,7 @@ const SystemMonitor = () => {
|
||||
}
|
||||
})
|
||||
.onError((error) => {
|
||||
setErrorMessage(error.message);
|
||||
setErrorMessage(String(error.error?.message || 'An error occurred'));
|
||||
});
|
||||
|
||||
useInterval(() => {
|
||||
|
||||
@@ -20,8 +20,8 @@ export function getStorage() {
|
||||
|
||||
export function storeLoginRedirect(location?: H.Location) {
|
||||
if (location) {
|
||||
getStorage().setItem(SIGN_IN_PATHNAME, location.pathname);
|
||||
getStorage().setItem(SIGN_IN_SEARCH, location.search);
|
||||
getStorage().setItem(SIGN_IN_PATHNAME, location.pathname as string);
|
||||
getStorage().setItem(SIGN_IN_SEARCH, location.search as string);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user