mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
Alova 3 now working
This commit is contained in:
@@ -6,8 +6,7 @@ import { toast } from 'react-toastify';
|
||||
import { ACCESS_TOKEN } from 'api/endpoints';
|
||||
|
||||
import * as AuthenticationApi from 'components/routing/authentication';
|
||||
// import { useRequest } from 'alova/client' // TODO replace when Alova 3 is released
|
||||
import { useRequest } from 'alova';
|
||||
import { useRequest } from 'alova/client';
|
||||
import { LoadingSpinner } from 'components';
|
||||
import { verifyAuthorization } from 'components/routing/authentication';
|
||||
import { useI18nContext } from 'i18n/i18n-react';
|
||||
@@ -42,7 +41,6 @@ const Authentication: FC<RequiredChildrenProps> = ({ children }) => {
|
||||
AuthenticationApi.clearAccessToken();
|
||||
setMe(undefined);
|
||||
if (doRedirect) {
|
||||
// navigate('/');
|
||||
redirect('/');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user