Skip to content

Commit

Permalink
Fix [UI] Useless "RETRY" click within the overlay notification (#2548)
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-prokopchuk committed Jun 25, 2024
1 parent d12a1b6 commit 49bd276
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/notifications.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ such restriction.

import { setNotification } from '../reducers/notificationReducer'
import { getErrorMsg } from 'igz-controls/utils/common.util'
import { FORBIDDEN_ERROR_STATUS_CODE } from 'igz-controls/constants'

export const showErrorNotification = (dispatch, error, defaultErrorMsg, customErrorMsg, retryCallback) => {
const notificationData = {
Expand All @@ -29,7 +30,7 @@ export const showErrorNotification = (dispatch, error, defaultErrorMsg, customEr
error
}

if (retryCallback) {
if (retryCallback && error.response.status !== FORBIDDEN_ERROR_STATUS_CODE) {
notificationData.retry = retryCallback
}

Expand Down

0 comments on commit 49bd276

Please sign in to comment.