From 4d01657e9cf196bda0b44fb3b051853c9fecdf6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Beye?= Date: Mon, 31 Oct 2022 15:47:32 +0100 Subject: [PATCH] feat(ui): remove redundant first confirmation dialog for fetching updates --- frontend/src/valetudo/Updater.tsx | 36 ++++++++++--------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/frontend/src/valetudo/Updater.tsx b/frontend/src/valetudo/Updater.tsx index c188be29b9..9a022dabc5 100644 --- a/frontend/src/valetudo/Updater.tsx +++ b/frontend/src/valetudo/Updater.tsx @@ -271,34 +271,20 @@ const StartUpdateControls: React.FunctionComponent<{ }> = ({ busyState }) => { - const [dialogOpen, setDialogOpen] = React.useState(false); const {mutate: sendCommand, isLoading: commandExecuting} = useUpdaterCommandMutation(); return ( - <> - { - setDialogOpen(true); - }} - sx={{mt: 1, mb: 1}} - > - Check for Updates - - { - setDialogOpen(false); - }} - onAccept={() => { - sendCommand("check"); - }} - /> - + { + sendCommand("check"); + }} + sx={{mt: 1, mb: 1}} + > + Check for Updates + ); };