From 2e6add0dace279e966c00a40abbacac3df8c87e1 Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 6 Jul 2024 12:34:41 +0200 Subject: [PATCH] remove error, unused --- interface/src/contexts/authentication/Authentication.tsx | 2 +- interface/src/framework/system/RestartMonitor.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/contexts/authentication/Authentication.tsx b/interface/src/contexts/authentication/Authentication.tsx index ffad48e49..bf71daf0f 100644 --- a/interface/src/contexts/authentication/Authentication.tsx +++ b/interface/src/contexts/authentication/Authentication.tsx @@ -33,7 +33,7 @@ const Authentication: FC = ({ children }) => { const decodedMe = AuthenticationApi.decodeMeJWT(accessToken); setMe(decodedMe); toast.success(LL.LOGGED_IN({ name: decodedMe.username })); - } catch (error) { + } catch { setMe(undefined); throw new Error('Failed to parse JWT'); } diff --git a/interface/src/framework/system/RestartMonitor.tsx b/interface/src/framework/system/RestartMonitor.tsx index 9abe17a3a..de77f7249 100644 --- a/interface/src/framework/system/RestartMonitor.tsx +++ b/interface/src/framework/system/RestartMonitor.tsx @@ -21,7 +21,7 @@ const RestartMonitor: FC = () => { try { await send(); document.location.href = '/'; - } catch (error) { + } catch { if (new Date().getTime() < timeoutAt.current) { setTimeoutId(setTimeout(poll.current, POLL_INTERVAL)); } else {