From 27ae8427734ec9209bab44a4c21eb8194fa66ef2 Mon Sep 17 00:00:00 2001 From: Stefan van Essen Date: Mon, 4 Dec 2023 12:34:37 +0100 Subject: [PATCH] Prioritize running job over success or failed status --- frontend/store/status/selectors.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/store/status/selectors.ts b/frontend/store/status/selectors.ts index 9128af9..2822d8e 100644 --- a/frontend/store/status/selectors.ts +++ b/frontend/store/status/selectors.ts @@ -5,14 +5,14 @@ import Status, { State } from '/types/status'; export const getStatuses = (state: RootState): Status[] => state.status.statuses; export const getGlobalState = (state: RootState): State => { - if (state.status.statuses.find((status) => status.state === 'error')) { - return 'error'; - } - if (state.status.statuses.find((status) => status.state === 'warning')) { return 'warning'; } + if (state.status.statuses.find((status) => status.state === 'error')) { + return 'error'; + } + return 'success'; };