Remove old comments and deprecated code snippets

This commit is contained in:
Daniel S. Hansen
2025-07-31 13:23:11 -07:00
parent fb096b403f
commit ee03a1d2f4
5 changed files with 5 additions and 38 deletions
@@ -1,6 +1,5 @@
import { useSlotRecipe, Box, Button, IconButton } from "@chakra-ui/react";
import { ColorModeButton, useColorMode } from "@/components/ui/color-mode";
// import { Tooltip } from "@/components/ui/tooltip";
import Tooltip from "../Canvas/components/Tooltip.jsx";
import { FaVolcano } from "react-icons/fa6";
import { FaHome } from "react-icons/fa";
@@ -9,7 +8,6 @@ import { FaMapMarkerAlt } from "react-icons/fa";
import { HiUsers } from "react-icons/hi2";
import { VscThreeBars } from "react-icons/vsc";
import { useState, useEffect } from "react";
import { Seismic } from "../Canvas/views/DashboardCanvasNav/Seismic";
import { DASHBOARD_VIEWS } from "@/constants/viewKeys";
export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) {
@@ -35,14 +33,13 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) {
// Track currrent view from both Sidebar and Canvas when 'view' changes
useEffect(() => {
// console.log("typeof view =", typeof view);
console.log("Current view = ", view);
const newIndex = buttons.findIndex((btn) => {
if (btn.view === "widget") {
return DASHBOARD_VIEWS.includes(view); // Group match
return DASHBOARD_VIEWS.includes(view);
}
return btn.view === view; // Exact match
return btn.view === view;
});
if (newIndex !== -1 ) {
@@ -52,7 +49,6 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) {
return (
<Box
// key={button.name}
css={styles.root}
width={isOpen ? "210px" : "71px"}
transition="width 0.4s ease"
@@ -76,7 +72,6 @@ export default function Sidebar({ view, onChangeView, darkMode, setDarkMode }) {
key={button.name}
css={styles.buttons}
onClick={() => {
// setActiveButton(idx);
onChangeView(button.view); // Trigger state change in Dashboard
}}
bg={activeButton === idx ? "primary":undefined}