Skip to content

Commit

Permalink
(fix) Fixed snackbar error messages causing react minified error (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
CynthiaKamau authored Mar 20, 2024
1 parent e5788b0 commit 1015323
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 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/billing.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import sortBy from 'lodash-es/sortBy';
import { apiBasePath } from './constants';

export const useBills = (patientUuid: string = '', billStatus: string = '') => {
const url = `${apiBasePath}bill?v=full`;
const url = `${apiBasePath}bill?v=full&limit=1000`;

const { data, error, isLoading, isValidating, mutate } = useSWR<{ data: { results: Array<PatientInvoice> } }>(
url,
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 1015323

Please sign in to comment.