Skip to content

Commit

Permalink
AD-219 Code reformat & minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz756 committed Apr 3, 2024
1 parent 2359d59 commit 1475283
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export function notificationReducer(notifications: Notification[], action: RootA
}
case "notifications/removeAllNotifications":
return []
case "notifications/removeNotificationsWithoutRedirect": {
return notifications.filter((notification) => notification.isRedirect)
}
default:
return notifications
}
Expand All @@ -23,6 +26,10 @@ interface AddNotification extends PayloadAction<"notifications/addNotification",
interface RemoveAllNotifications extends Action<"notifications/removeAllNotifications"> {
}

interface RemoveNotificationsWithoutRedirect extends Action<"notifications/removeNotificationsWithoutRedirect"> {
}

export type NotificationAction =
AddNotification
| RemoveAllNotifications
| RemoveAllNotifications
| RemoveNotificationsWithoutRedirect
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class AddressService {
'CSRFToken': CSRFToken
}
}).then(() => true)
.catch((errorResponse: AxiosError<ErrorResponse>) => { //w serwisach umiescic
.catch((errorResponse: AxiosError<ErrorResponse>) => {
ErrorHandler.handleError(errorResponse)
console.error('Error on address select')
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export class PaymentService {
})
.catch((errorResponse: AxiosError<ErrorResponse>): PaymentResponse | void => {
console.error('Error on place order')
console.log(errorResponse)
console.log(errorResponse.response.data.errorCode)
if (errorResponse.response.status === 400) {
return {
success: false,
Expand Down

0 comments on commit 1475283

Please sign in to comment.