feat: Integrate PapaParse for CSV handling

Adds papaparse as a dependency and updates the data processing service to use it for more robust CSV file parsing. This replaces manual CSV parsing logic with a dedicated library, improving reliability and handling of various CSV formats.

Also renames the `MoversIcon` to `TrendingIcon` to better reflect its usage in indicating trending performance metrics.
This commit is contained in:
Christian
2025-12-11 14:03:33 +01:00
parent 9ba63ab8f8
commit 31eed97ec4
14 changed files with 1311 additions and 1333 deletions
+5 -4
View File
@@ -1,3 +1,4 @@
import React, { ChangeEvent, useState } from 'react';
import { UploadIcon } from './Icons';
@@ -85,13 +86,13 @@ const FileUpload: React.FC<FileUploadProps> = ({
<UploadIcon />
</div>
<div className="text-center">
<h3 className="font-semibold text-slate-200">Upload Data File</h3>
<p className="text-xs text-slate-500 mt-1">Supports .csv, .xlsx, .xls</p>
<h3 className="font-semibold text-slate-200">Upload Local CSV</h3>
<p className="text-xs text-slate-500 mt-1">Click to select file</p>
</div>
<input
id="file-upload"
type="file"
accept=".csv, .xlsx, .xls"
accept=".csv"
onChange={handleChange}
disabled={isLoading}
className="hidden"
@@ -138,4 +139,4 @@ const FileUpload: React.FC<FileUploadProps> = ({
);
};
export default FileUpload;
export default FileUpload;