diff --git a/src/App.jsx b/src/App.jsx index 2d7e010..1068d56 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -31,6 +31,7 @@ import ScrollToTopButton from "./components/ScrollToTopButton"; import SkeletonDashboard from "./components/SkeletonDashboard"; import { eventBus } from "./core/events"; import { useSWR } from "./hooks/useSWR"; +import { estimateExposureTime, estimateWeeklyMonthlyAverages, fetchAirQualityByCoords, @@ -62,7 +63,7 @@ import Glossary from "./components/Glossary"; import Leaderboard from "./components/Leaderboard"; import SmartAlertsDashboard from "./components/SmartAlertsDashboard"; import NoisePollutionTracker from "./components/NoisePollutionTracker"; -import OceanAcidificationMonitor from "./components/OceanAcidificationMonitor"; +import OceanAcidificationMonitor from "./components/OceanAcidificationMonitor"; import HealthImpactDashboard from "./components/HealthImpactDashboard"; @@ -356,9 +357,9 @@ export function SectionNav({ activeSection, onSectionChange }) { { id: "eco-impact", label: "Eco Impact" }, { id: "city-leaderboard", label: "City Leaderboard" }, { id: "marine", label: "Marine Water Quality" }, - { id: "smart-alerts", label: "Smart Alerts" }, + { id: "smart-alerts", label: "Smart Alerts" }, { id: "noise-pollution", label: "Noise Pollution" }, - { id: "ocean-acid", label: "Ocean Acidification" }, + { id: "ocean-acid", label: "Ocean Acidification" }, { id: "smart-alerts", label: "Smart Alerts" }, { id: "ocean-acid", label: "Ocean Acidification" }, @@ -1279,9 +1280,9 @@ function AppContent() { )} - {activeSection === "smart-alerts" && } + {activeSection === "smart-alerts" && } {activeSection === "noise-pollution" && } - {activeSection === "ocean-acid" && } + {activeSection === "ocean-acid" && } {activeSection === "health-impact" && } {activeSection === "CarbonCalculator" && ( diff --git a/src/components/Leaderboard.jsx b/src/components/Leaderboard.jsx index e075f04..8fcb650 100644 --- a/src/components/Leaderboard.jsx +++ b/src/components/Leaderboard.jsx @@ -143,7 +143,6 @@ export default function Leaderboard() { }, [isAuthenticated, user, stats]); const leaderboard = useMemo(() => getLeaderboardData(), [getLeaderboardData]); - const nextLevel = useMemo(() => nextTrustLevel(stats.points), [stats.points]); const currentUserRank = useMemo(() => { return leaderboard.findIndex(item => item.isCurrentUser) + 1; diff --git a/src/components/NoisePollutionTracker.jsx b/src/components/NoisePollutionTracker.jsx index e5e0e70..767c800 100644 --- a/src/components/NoisePollutionTracker.jsx +++ b/src/components/NoisePollutionTracker.jsx @@ -463,7 +463,7 @@ export default function NoisePollutionTracker() {
Night Compliance
-
(h.hour >= 22 || h.hour < 6) && h.db > zone.nightLimit).length === 0 ? "#22c55e" : "#ef4444"}> +
(h.hour >= 22 || h.hour < 6) && h.db > zone.nightLimit).length === 0 ? "#22c55e" : "#ef4444" }}> {Math.round(hourly.filter(h => (h.hour >= 22 || h.hour < 6) && h.db <= zone.nightLimit).length / hourly.filter(h => h.hour >= 22 || h.hour < 6).length * 100)}%