- Implemented DetailPage for detailed KPI analysis including charts and status badges. - Created HomePage to display an overview of KPIs categorized by security, quality, delays, costs, and maintenance. - Introduced KPI types and data structures for better type safety. - Added styles for DetailPage, HomePage, KPICard, and charts for improved UI. - Integrated web vitals reporting and setup tests for better performance tracking and testing. - Included a CSV file with mathematical formulas for KPI calculations.
16 lines
425 B
TypeScript
16 lines
425 B
TypeScript
import { ReportHandler } from 'web-vitals';
|
|
|
|
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
|
|
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
getCLS(onPerfEntry);
|
|
getFID(onPerfEntry);
|
|
getFCP(onPerfEntry);
|
|
getLCP(onPerfEntry);
|
|
getTTFB(onPerfEntry);
|
|
});
|
|
}
|
|
};
|
|
|
|
export default reportWebVitals;
|