diff --git a/frontend/src/pages/System/index.tsx b/frontend/src/pages/System/index.tsx index d82dcf4f8..e9e648f27 100644 --- a/frontend/src/pages/System/index.tsx +++ b/frontend/src/pages/System/index.tsx @@ -319,6 +319,7 @@ function AuthCard(): JSX.Element { */ function RestartCard(): JSX.Element { const [httpErrorText, setHttpErrorText] = useState(""); + const [showRestartToast, setShowRestartToast] = useState(false); const id = useId(); @@ -336,6 +337,7 @@ function RestartCard(): JSX.Element { setTimeout(() => { window.location.reload(); }, 5000); + setShowRestartToast(true); } catch (e) { setHttpErrorText(`Error restarting the device: ${e}`); } @@ -344,12 +346,19 @@ function RestartCard(): JSX.Element { return ( <> setHttpErrorText("")} > Failed to restart: {httpErrorText} + {setShowRestartToast(false)}} + > + Restarting the device... +
Failed to restart: {httpErrorText}
Restarting the device...