diff --git a/app/components/HistoricalResult.tsx b/app/components/HistoricalResult.tsx index 7e17db2..d2cb84b 100644 --- a/app/components/HistoricalResult.tsx +++ b/app/components/HistoricalResult.tsx @@ -28,7 +28,7 @@ export const HistoricalResult = ({ data }: HistoricalResultProps) => { monthsSet.add(month); quotaPremiumMap[vehicle_class] = { ...quotaPremiumMap[vehicle_class], - [month]: parseInt(premium, 10), + [month]: premium, }; }); diff --git a/app/components/MonthlyResult.tsx b/app/components/MonthlyResult.tsx index 95a8bd1..1e2d65e 100644 --- a/app/components/MonthlyResult.tsx +++ b/app/components/MonthlyResult.tsx @@ -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, diff --git a/types/index.ts b/types/index.ts index 416a85b..8633c73 100644 --- a/types/index.ts +++ b/types/index.ts @@ -30,8 +30,8 @@ export interface COEResult { month: string; bidding_no: string; vehicle_class: string; - quota: string; - bids_success: string; - bids_received: string; - premium: string; + quota: number; + bids_success: number; + bids_received: number; + premium: number; }