diff --git a/client/src/components/SettingsButton.jsx b/client/src/components/SettingsButton.jsx
index 332c84f..afb7936 100644
--- a/client/src/components/SettingsButton.jsx
+++ b/client/src/components/SettingsButton.jsx
@@ -2,7 +2,7 @@
// for 'Add Widget', 'Edit Widgets', and 'Remove Widgets'. This component will
// control settings related to the Widgets on the main canvas.
-import { Button, Menu, Portal } from "@chakra-ui/react";
+import { Button, IconButton, Menu, Portal } from "@chakra-ui/react";
import { FiSettings } from "react-icons/fi";
export function SettingsButton(props) {
@@ -25,9 +25,9 @@ export function SettingsButton(props) {
// This uses Chakra's built in menu component
-
+
-
+
diff --git a/client/src/components/sidebar.jsx b/client/src/components/sidebar.jsx
index 2f40b1f..39ea197 100644
--- a/client/src/components/sidebar.jsx
+++ b/client/src/components/sidebar.jsx
@@ -1,4 +1,4 @@
-import { Box, Button, createIcon, CloseButton, IconButton, Stack } from "@chakra-ui/react";
+import { Box, Button, createIcon, CloseButton, IconButton, Stack, useDisclosure, Tooltip } from "@chakra-ui/react";
import { FaVolcano } from "react-icons/fa6";
import { RxHamburgerMenu } from "react-icons/rx";
import { useState } from "react";
@@ -56,87 +56,326 @@ export const Users = createIcon({
),
});
-export default function Sidebar () {
+
+export default function Sidebar() {
const [isOpen, setIsOpen] = useState(true);
- const [activeButton, setActiveButton] = useState("Dashboard")
+ const [activeButton, setActiveButton] = useState("Dashboard");
return (
- <>
- {isOpen && (
-
- {/* setIsOpen(!isOpen)}> */}
- {/* setIsOpen(!isOpen)}> */}
- setIsOpen(!isOpen)}
- >
-
-
- setActiveButton("Dashboard")} bg={activeButton === "Dashboard" ? "#A4B6B6" : "transparent"}>
- Dashboard
-
- setActiveButton("Global")} bg={activeButton === "Global" ? "#A4B6B6" : "transparent"}>
- Global Map
-
- setActiveButton("Regional")} bg={activeButton === "Regional" ? "#A4B6B6" : "transparent"}>
- Regional Map
-
- setActiveButton("Volcano")} bg={activeButton === "Volcano" ? "#A4B6B6" : "transparent"}>
- Volcano
-
- setActiveButton("Admin")} bg={activeButton === "Admin" ? "#A4B6B6" : "transparent"}>
- Admin
-
-
- )}
+
+ setIsOpen(!isOpen)}
+ // icon={ }
+ >
+
+
+ {/* Dashboard */}
+ setActiveButton("Dashboard")}
+ bg={activeButton === "Dashboard" ? "#A4B6B6" : "transparent"}
+ _hover={{
+ bg: activeButton === "Dashboard" ? "#A4B6B6" : "#EDF1F1",
+ }}
+ >
+ {isOpen ? (
+ <>
+ {/* */}
+
+ {/* Make text appear gradually instead of popping in */}
+
+ Dashboard
+
+ >
+ ) : (
+ //
+
+ )}
+
- {!isOpen && (
-
- setIsOpen(!isOpen)}>
-
-
- setActiveButton("Dashboard")} bg={activeButton === "Dashboard" ? "#A4B6B6" : "transparent"}>
-
-
- setActiveButton("Global")} bg={activeButton === "Global" ? "#A4B6B6" : "transparent"}>
+ {/* Global Map */}
+ setActiveButton("Global")}
+ bg={activeButton === "Global" ? "#A4B6B6" : "transparent"}
+ _hover={{
+ bg: activeButton === "Global" ? "#A4B6B6" : "#EDF1F1",
+ }}
+ >
+ {isOpen ? (
+ <>
+ {/* */}
-
- setActiveButton("Regional")} bg={activeButton === "Regional" ? "#A4B6B6" : "transparent"}>
-
-
- setActiveButton("Volcano")} bg={activeButton === "Volcano" ? "#A4B6B6" : "transparent"}>
-
-
- setActiveButton("Admin")} bg={activeButton === "Admin" ? "#A4B6B6" : "transparent"}>
+ {/* Make text appear gradually instead of popping in */}
+
+ Global Map
+
+ >
+ ) : (
+ //
+
+ )}
+
+
+ {/* Regional Map */}
+ setActiveButton("Regional")}
+ bg={activeButton === "Regional" ? "#A4B6B6" : "transparent"}
+ _hover={{
+ bg: activeButton === "Regional" ? "#A4B6B6" : "#EDF1F1",
+ }}
+ >
+ {isOpen ? (
+ <>
+ {/* */}
+
+ {/* Make text appear gradually instead of popping in */}
+
+ Regional Map
+
+ >
+ ) : (
+ //
+
+ )}
+
+
+ {/* Volcano */}
+ setActiveButton("Volcano")}
+ bg={activeButton === "Volcano" ? "#A4B6B6" : "transparent"}
+ _hover={{
+ bg: activeButton === "Volcano" ? "#A4B6B6" : "#EDF1F1",
+ }}
+ >
+ {isOpen ? (
+ <>
+
+ {/* Make text appear gradually instead of popping in */}
+
+ Volcano
+
+ >
+ ) : (
+ //
+
+ )}
+
+
+ {/* Admin */}
+ setActiveButton("Admin")}
+ bg={activeButton === "Admin" ? "#A4B6B6" : "transparent"}
+ _hover={{
+ bg: activeButton === "Admin" ? "#A4B6B6" : "#EDF1F1",
+ }}
+ >
+ {isOpen ? (
+ <>
+ {/* */}
-
-
- )}
-
- >
+ {/* Make text appear gradually instead of popping in */}
+
+ Admin
+
+ >
+ ) : (
+ //
+
+ )}
+
+
);
}
+
+// THIS CODE WORKS, SAVE IN CASE OF EMERGENCY
+// Needed to refactor in order allow transitions to work properly
+
+// export default function Sidebar () {
+// const [isOpen, setIsOpen] = useState(true);
+// const [activeButton, setActiveButton] = useState("Dashboard")
+
+// return (
+// <>
+// {isOpen && (
+//
+// {/* setIsOpen(!isOpen)}> */}
+// {/* setIsOpen(!isOpen)}> */}
+// setIsOpen(!isOpen)}
+// >
+//
+//
+// setActiveButton("Dashboard")} bg={activeButton === "Dashboard" ? "#A4B6B6" : "transparent"}>
+// Dashboard
+//
+// setActiveButton("Global")} bg={activeButton === "Global" ? "#A4B6B6" : "transparent"}>
+// Global Map
+//
+// setActiveButton("Regional")} bg={activeButton === "Regional" ? "#A4B6B6" : "transparent"}>
+// Regional Map
+//
+// setActiveButton("Volcano")} bg={activeButton === "Volcano" ? "#A4B6B6" : "transparent"}>
+// Volcano
+//
+// setActiveButton("Admin")} bg={activeButton === "Admin" ? "#A4B6B6" : "transparent"}>
+// Admin
+//
+//
+// )}
+
+// {!isOpen && (
+//
+// setIsOpen(!isOpen)}>
+//
+//
+// setActiveButton("Dashboard")} bg={activeButton === "Dashboard" ? "#A4B6B6" : "transparent"}>
+//
+//
+// setActiveButton("Global")} bg={activeButton === "Global" ? "#A4B6B6" : "transparent"}>
+//
+//
+// setActiveButton("Regional")} bg={activeButton === "Regional" ? "#A4B6B6" : "transparent"}>
+//
+//
+// setActiveButton("Volcano")} bg={activeButton === "Volcano" ? "#A4B6B6" : "transparent"}>
+//
+//
+// setActiveButton("Admin")} bg={activeButton === "Admin" ? "#A4B6B6" : "transparent"}>
+//
+//
+//
+// )}
+
+// >
+// );
+// }