Skip to content

Commit

Permalink
Fix COE values crashing on string with comma separator
Browse files Browse the repository at this point in the history
  • Loading branch information
Ru Chern Chong committed Jul 9, 2024
1 parent 1e3b0b1 commit e537641
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions app/components/MonthlyResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ export const MonthlyResult = ({ data }: MonthlyResultProps) => {
...new Set(filteredData.map(({ bidding_no }) => bidding_no)),
];
const chartCategories = filteredData.map((item) => item.vehicle_class);
const premium = filteredData.map((item) => parseInt(item.premium, 10));
const bidsReceived = filteredData.map((item) =>
parseInt(item.bids_received.replace(/,/g, ""), 10),
);
const bidsSuccess = filteredData.map((item) =>
parseInt(item.bids_success.replace(/,/g, ""), 10),
);
const quotas = filteredData.map((item) => parseInt(item.quota, 10));
const premium = filteredData.map((item) => item.premium);
const bidsReceived = filteredData.map((item) => item.bids_received);
const bidsSuccess = filteredData.map((item) => item.bids_success);
const quotas = filteredData.map((item) => item.quota);

const graphTitle = ({
month,
Expand Down

0 comments on commit e537641

Please sign in to comment.