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)} + // icon={} + > + + + {/* Dashboard */} + - {!isOpen && ( - - setIsOpen(!isOpen)}> - - - setActiveButton("Dashboard")} bg={activeButton === "Dashboard" ? "#A4B6B6" : "transparent"}> - - - setActiveButton("Global")} bg={activeButton === "Global" ? "#A4B6B6" : "transparent"}> + {/* Global Map */} + + + {/* Regional Map */} + + + {/* Volcano */} + + + {/* 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)}> */} +// +// +// +// +// +// +// +// )} + +// {!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"}> +// +// +// +// )} + +// +// ); +// }