Refactor components and enhance metrics calculations:

- Update access denied messages to use HTML entities.
- Add autoComplete attributes to forms for better user experience.
- Improve trend calculations in sessionMetrics function.
- Update MetricCard props to accept React nodes for icons.
- Integrate Next.js Image component in Sidebar for optimization.
- Adjust ESLint rules for better code quality.
- Add new properties for trends in MetricsResult interface.
- Bump version to 0.2.0 in package.json.
This commit is contained in:
2025-05-22 14:44:28 +02:00
parent e3134aa451
commit efb5261c7d
10 changed files with 172 additions and 88 deletions

View File

@ -44,7 +44,6 @@ const getCountryCoordinates = (): Record<string, [number, number]> => {
return coordinates;
} catch (error) {
// eslint-disable-next-line no-console
console.error("Error loading country coordinates:", error);
return coordinates;
}
@ -88,8 +87,6 @@ export default function GeographicMap({
.filter(([code]) => {
// If no coordinates found, log to help with debugging
if (!countryCoordinates[code] && !DEFAULT_COORDINATES[code]) {
// eslint-disable-next-line no-console
console.warn(`Missing coordinates for country code: ${code}`);
return false;
}
return true;
@ -102,14 +99,12 @@ export default function GeographicMap({
}));
// Log for debugging
// eslint-disable-next-line no-console
console.log(
`Found ${data.length} countries with coordinates out of ${Object.keys(countries).length} total countries`
);
setCountryData(data);
} catch (error) {
// eslint-disable-next-line no-console
console.error("Error processing geographic data:", error);
setCountryData([]);
}