From b9e7003f6044a06908264a22fee3ded2a87ed4eb Mon Sep 17 00:00:00 2001 From: ElMoribond Date: Thu, 15 Jul 2021 17:50:24 +0200 Subject: [PATCH] Improve restart from UI --- web/src/components/DialogRestart.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/DialogRestart.jsx b/web/src/components/DialogRestart.jsx index d066275ce..e33ae7644 100644 --- a/web/src/components/DialogRestart.jsx +++ b/web/src/components/DialogRestart.jsx @@ -1,10 +1,10 @@ import { h, Fragment } from 'preact'; import Dialog from './Dialog'; -import { useCallback, useEffect, useState } from 'preact/hooks'; +import { useEffect } from 'preact/hooks'; import { useRestart } from '../api/mqtt'; export default function DialogRestart({ show, setShow }) { - const { payload: restartedMessage = null, send: sendRestart } = useRestart(); + const { send: sendRestart } = useRestart(); useEffect(() => { if (show === 2) { @@ -17,7 +17,7 @@ export default function DialogRestart({ show, setShow }) { try { const response = await fetch('/api/config', { method: 'GET' }); if (await response.status === 200) { - break;; + break; } } catch (e) {}