From 64df0e0b32187f0ec786a8c8d50d28b2581ec0b5 Mon Sep 17 00:00:00 2001 From: Marco Piovanello <35533749+marcopeocchi@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:08:40 +0200 Subject: [PATCH] fix use old enum status values (#187) --- frontend/src/components/DownloadsGridView.tsx | 2 +- frontend/src/components/DownloadsTableView.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/DownloadsGridView.tsx b/frontend/src/components/DownloadsGridView.tsx index 1b53c7f..ca2fc4e 100644 --- a/frontend/src/components/DownloadsGridView.tsx +++ b/frontend/src/components/DownloadsGridView.tsx @@ -14,7 +14,7 @@ const DownloadsGridView: React.FC = () => { const { client } = useRPC() const { pushMessage } = useToast() - const stop = (r: RPCResult) => r.progress.process_status === ProcessStatus.Completed + const stop = (r: RPCResult) => r.progress.process_status === ProcessStatus.COMPLETED ? client.clear(r.id) : client.kill(r.id) diff --git a/frontend/src/components/DownloadsTableView.tsx b/frontend/src/components/DownloadsTableView.tsx index 4b6baa7..d15dff9 100644 --- a/frontend/src/components/DownloadsTableView.tsx +++ b/frontend/src/components/DownloadsTableView.tsx @@ -133,7 +133,7 @@ const DownloadsTableView: React.FC = () => { window.open(`${serverAddr}/archive/d/${encoded}?token=${localStorage.getItem('token')}`) } - const stop = (r: RPCResult) => r.progress.process_status === ProcessStatus.Completed + const stop = (r: RPCResult) => r.progress.process_status === ProcessStatus.COMPLETED ? client.clear(r.id) : client.kill(r.id)