Skip to content

Commit

Permalink
(fix) Fixed snackbar error messages causing react minified error
Browse files Browse the repository at this point in the history
  • Loading branch information
CynthiaKamau committed Mar 19, 2024
1 parent e5788b0 commit 1e0c562
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const AddBillableService: React.FC = () => {
handleNavigateToServiceDashboard();
},
(error) => {
showSnackbar({ title: 'Bill payment error', kind: 'error', subtitle: error });
showSnackbar({ title: 'Bill payment error', kind: 'error', subtitle: error?.message });
},
);
};
Expand Down
4 changes: 2 additions & 2 deletions src/billing-form/billing-form.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const BillingForm: React.FC<BillingFormProps> = ({ patientUuid, closeWorkspace }
};

billItems.forEach((item) => {
const lineItem: any = {
let lineItem: any = {
quantity: parseInt(item.Qnty),
price: item.Price,
priceName: 'Default',
Expand Down Expand Up @@ -198,7 +198,7 @@ const BillingForm: React.FC<BillingFormProps> = ({ patientUuid, closeWorkspace }
});
},
(error) => {
showSnackbar({ title: 'Bill processing error', kind: 'error', subtitle: error });
showSnackbar({ title: 'Bill processing error', kind: 'error', subtitle: error?.message });
},
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/invoice/payments/payments.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const Payments: React.FC<PaymentProps> = ({ bill, selectedLineItems }) => {
handleNavigateToBillingDashboard();
},
(error) => {
showSnackbar({ title: 'Bill payment error', kind: 'error', subtitle: error });
showSnackbar({ title: 'Bill payment error', kind: 'error', subtitle: error?.message });
},
);
};
Expand Down

0 comments on commit 1e0c562

Please sign in to comment.