Add comprehensive dashboard features

Introduce company settings, user management, and layout components
Implement session-based Company and User pages for admin access
Integrate chart components for dynamic data visualization
Add Sidebar for modular navigation
Revamp global styles with Tailwind CSS

Enhances user experience and administrative control
This commit is contained in:
2025-05-22 14:12:36 +02:00
parent a17b66c078
commit e3134aa451
12 changed files with 1302 additions and 454 deletions

View File

@ -79,11 +79,11 @@ export default function GeographicMap({
// Process country data when client is ready and dependencies change
useEffect(() => {
if (!isClient) return;
if (!isClient || !countries) return;
try {
// Generate CountryData array for the Map component
const data: CountryData[] = Object.entries(countries)
const data: CountryData[] = Object.entries(countries || {})
// Only include countries with known coordinates
.filter(([code]) => {
// If no coordinates found, log to help with debugging
@ -115,8 +115,8 @@ export default function GeographicMap({
}
}, [countries, countryCoordinates, isClient]);
// Find the max count for scaling circles - handle empty countries object
const countryValues = Object.values(countries);
// Find the max count for scaling circles - handle empty or null countries object
const countryValues = countries ? Object.values(countries) : [];
const maxCount = countryValues.length > 0 ? Math.max(...countryValues, 1) : 1;
// Show loading state during SSR or until client-side rendering takes over