Skip to content

Commit

Permalink
frontend: ActionsNotifier: Use unique refKey for errors
Browse files Browse the repository at this point in the history
This change adds a unique refKey for error states, separate from success
states, addressing a regression where failure notifications would not
appear in the UI.

Fixes: #2655

Signed-off-by: Evangelos Skopelitis <[email protected]>
  • Loading branch information
skoeva committed Dec 12, 2024
1 parent b1e62cf commit 913c272
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/components/common/ActionsNotifier.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@ function PureActionsNotifier({ dispatch, clusterActions }: PureActionsNotifierPr
}

if (clusterAction.message) {
// Check for completed actions
// Check for success or error states
const refKey =
clusterAction.state === 'complete' ? `${clusterAction.id}-complete` : clusterAction.id;
clusterAction.state === 'complete'
? `${clusterAction.id}-complete`
: clusterAction.state === 'error'
? `${clusterAction.id}-error`
: clusterAction.id;

if (!snackbarRefs.current[refKey]) {
snackbarRefs.current[refKey] = uniqueKey;
Expand Down

0 comments on commit 913c272

Please sign in to comment.