mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
remove error, unused
This commit is contained in:
@@ -33,7 +33,7 @@ const Authentication: FC<RequiredChildrenProps> = ({ children }) => {
|
|||||||
const decodedMe = AuthenticationApi.decodeMeJWT(accessToken);
|
const decodedMe = AuthenticationApi.decodeMeJWT(accessToken);
|
||||||
setMe(decodedMe);
|
setMe(decodedMe);
|
||||||
toast.success(LL.LOGGED_IN({ name: decodedMe.username }));
|
toast.success(LL.LOGGED_IN({ name: decodedMe.username }));
|
||||||
} catch (error) {
|
} catch {
|
||||||
setMe(undefined);
|
setMe(undefined);
|
||||||
throw new Error('Failed to parse JWT');
|
throw new Error('Failed to parse JWT');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const RestartMonitor: FC = () => {
|
|||||||
try {
|
try {
|
||||||
await send();
|
await send();
|
||||||
document.location.href = '/';
|
document.location.href = '/';
|
||||||
} catch (error) {
|
} catch {
|
||||||
if (new Date().getTime() < timeoutAt.current) {
|
if (new Date().getTime() < timeoutAt.current) {
|
||||||
setTimeoutId(setTimeout(poll.current, POLL_INTERVAL));
|
setTimeoutId(setTimeout(poll.current, POLL_INTERVAL));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user