updating names cont.

This commit is contained in:
2025-08-05 15:08:18 -07:00
parent c4d9725583
commit 46b27d90dd
12 changed files with 33 additions and 35 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) {
// this list of btns will come from the db (not every usr will have access to admin)
const buttons = [
{icon: FaHome, name: "Home", view: "widget"},
{icon: FaHome, name: "Home", view: "mydashboard"},
{icon: FaGlobeAmericas, name: "Global Map", view: "global"},
{icon: FaMapMarkerAlt, name: "Regional Map", view: "regional"},
{icon: FaVolcano, name: "Volcano", view: "volcano"},
@@ -35,7 +35,7 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) {
useEffect(() => {
console.log("Current view = ", view);
const newIndex = buttons.findIndex((btn) => {
if (btn.view === "widget") {
if (btn.view === "mydashboard") {
return DASHBOARD_VIEWS.includes(view);
}
return btn.view === view;